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.
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
YDB Support #3
YDB Support #3
Changes from 15 commits
32bc791
d8c5027
8f56312
44abc30
4dd2ac5
ee172d8
754a74d
a7e222d
532b4ac
86ae1fa
7bfd098
bd9bdae
0d18ddb
2e3253b
5b21bf5
1aa3455
fecf8d7
76093a1
bfe9fba
8baa73b
81f152f
063c1d0
c2ac3bc
1e4515c
b5aa72f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
not required. Protocol defined in connection string directly
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.
golang-migrate uses scheme to determine db driver --
https://github.com/golang-migrate/migrate/blob/master/database/driver.go#L86
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.
In other places you use
db.driver.Query()
, here we should also use itThere 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.
We can use a query with parameters here to eliminate compilation time from migration progress. I am not sure if it is meaningful, though, it is okay to do it with a
Sprintf
.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.
I guess the difference would be in µs and this is a script which will be run manually, so I think
Sprintf
would be ok:)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.
You clear the table in
SetVersion()
, then maybe we do not needORDER BY DESC LIMIT 1
here?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.
ORDER BY DESC
is not needed, and actuallyLIMIT 1
also not neededbut all other adapters use
LIMIT 1
, so I left this for unificationThere 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.
Other db adapters in the repo use
DROP TABLE IF EXISTS
, I am not really sure why, but maybe we should keep it consistent and add IF EXISTS hereThere 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.
add
NOT NULL
to scheme