-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: create DB and Tables via REST and CLI #25687
Conversation
This commit does a few things: 1. It brings the database command naming scheme for types inline with the rest of the CLI types 2. It brings the table command naming scheme for types inline with the rest of the CLI types 3. Adds tests to check that the num of dbs is not exceeded and that you cannot create more than one database with a given name. 4. Adds tests to check that you can create a table and put data into it and querying it 5. Adds tests for the CLI for both the database and table commands 6. It creates an endpoint to create databases given a JSON blob 7. It creates an endpoint to create tables given a JSON blob With this users can now create a database or table without first needing to write to the database via the line protocol! Closes #25640 Closes #25641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except that tables without tags are valid.
influxdb3/tests/server/configure.rs
Outdated
.send() | ||
.await | ||
.expect("create table call failed"); | ||
assert_eq!(StatusCode::UNPROCESSABLE_ENTITY, resp.status()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be an OK? Tables without tags are valid.
fields: Vec<(String, String)>, | ||
) -> Result<(), self::Error> { | ||
if tags.is_empty() { | ||
return Err(self::Error::EmptyTagSet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tags should be valid.
c2b86a1
to
4ae4bc4
Compare
This commit does a few things:
With this users can now create a database or table without first needing to write to the database via the line protocol!
Closes #25640
Closes #25641