Repository navigation
Create table builder structure - #659
Merged
Merged
Conversation
Pull Request Test Coverage Report for Build 3207601177
💛 - Coveralls |
Contributor
|
I think this makes a lot of sense to me 👍 I think it needs some docstrings (ideally with an example) but otherwise 🚀 |
Contributor
Author
Ok! Will be done in 10 :) |
Contributor
Author
|
@alamb done! |
Contributor
|
Looks like there is a minor issue with rustfmt/clippy |
alamb
approved these changes
Oct 7, 2022
alamb
left a comment
Contributor
There was a problem hiding this comment.
LGTM -- thanks @AugustoFKL
Comment on lines
+15
to
+16
| /// This structure is a facilitator to allow building and accessing a create table with more ease, | ||
| /// without needing to: |
Contributor
There was a problem hiding this comment.
Suggested change
| /// This structure is a facilitator to allow building and accessing a create table with more ease, | |
| /// without needing to: | |
| /// This structure helps building and accessing a `create table` with more ease, | |
| /// without needing to: |
| /// builder.build().to_string(), | ||
| /// "CREATE TABLE IF NOT EXISTS table_name (c1 INT)" | ||
| /// ) | ||
| /// |
| assert_eq!(builder, CreateTableBuilder::try_from(stmt).unwrap()); | ||
| } | ||
|
|
||
| #[test] |
Contributor
|
It just needs to get a clean CI and we can merge it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal of usage of a
CreateTableBuilderstructure, instead of the pure create table that we've been using right now.This has 2 benefits:
@alamb @nickolay what do you think?
I know this resembles #315 (comment) but, instead of replacing our current API, we can give the upstream the possibility of creating the struct, moving it with more ease around the code. If you think that's OK, I'll add a
TryFrom<Statement>for this (or maybe just a convert method), and expand that going from the biggest statement to the smallest.