8000 [enhance]: create database by with statement · Issue #995 · lindb/lindb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[enhance]: create database by with statement #995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevin6025 opened this issue Nov 30, 2023 · 3 comments
Closed

[enhance]: create database by with statement #995

kevin6025 opened this issue Nov 30, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@kevin6025
Copy link
Member

Please describe enhancement
create database schema by with statement not json.

like:
create database apm with (shards=2,replica=3.....)

@kevin6025 kevin6025 added the enhancement New feature or request label Nov 30, 2023
@joyant
Copy link
Contributor
joyant commented Nov 30, 2023

When I first used Lindb, I was as confused as you because inputting JSON-formatted strings in the CLI is not straightforward. Many times, I had to carefully check whether the structure was correctly closed. Fortunately, creating databases is not something that happens frequently.

Your suggestion is excellent. It's very intuitive when configuring values as strings and numbers. However, when you encounter situations where values must be expressed using arrays and objects, you start to think about what kind of DSL would make it easier. After some contemplation, you often find yourself back at JSON format.

Just my personal opinion.

@stone1100 stone1100 self-assigned this Nov 30, 2023
@joyant
Copy link
Contributor
joyant commented Dec 11, 2023

I would like to inquire if the mentioned issue has already been initiated. If not, please assign it to me and provide the completed syntax, especially regarding the syntax for options. @stone1100

@stone1100
Copy link
Member

I do some research. You can ref to https://github.com/antlr/grammars-v4/blob/master/sql/trino/TrinoParser.g4.

Create database schema includes two config options:

  1. database config props;
  2. database rollup config;

Example:
create database apm with( shard:1, replica:2, ..... ) rollup ( (interval:1h,ttl:1m), (interval:1d,ttl:1y) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
0