-
Notifications
You must be signed in to change notification settings - Fork 221
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
Bump up sqlparser
crate version from 0.11 to 0.13
#479
Conversation
core/src/translate/mod.rs
Outdated
return Err(TranslateError::JoinOnUpdateNotSupported.into()); | ||
} | ||
match &table.relation { | ||
TableFactor::Table { name, .. } => Ok(ObjectName(translate_idents(&name.0))), |
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 can use translate_object_name
here
core/src/translate/mod.rs
Outdated
} | ||
match &table.relation { | ||
TableFactor::Table { name, .. } => Ok(ObjectName(translate_idents(&name.0))), | ||
_ => Err(TranslateError::JoinOnUpdateNotSupported.into()), |
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.
It looks that this could be not directly related to JOIN.
Let's add a new error with UnsupportedTableFactor(String)
and have a corresponding test case for this.
Codecov Report
@@ Coverage Diff @@
## main #479 +/- ##
==========================================
+ Coverage 91.59% 91.61% +0.02%
==========================================
Files 160 160
Lines 9366 9379 +13
==========================================
+ Hits 8579 8593 +14
+ Misses 787 786 -1
Continue to review full report at Codecov.
|
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.
All looks good, thanks a lot! Merging 👍
Most of the changes are in SqlStatement::Update part, - table field is now TableWithJoin type, so I had to take relation field out of it and converted into ObjectName. - SqlAssignment's id is now Vec<Ident> type, so I took only the first element's value.
Most of the changes are in SqlStatement::Update part, - table field is now TableWithJoin type, so I had to take relation field out of it and converted into ObjectName. - SqlAssignment's id is now Vec<Ident> type, so I took only the first element's value.
Bump up
sqlparser
version.Changes made
Most of the changes are in
SqlStatement::Update
part,table
field is nowTableWithJoin
type, so I had to takerelation
field out of it and converted intoObjectName
.SqlAssignment
'sid
is nowVec<Ident>
type, so I took only the first element's value.TODO's after implementing
Join
JoinOnUpdateNotSupported
error.