-
Notifications
You must be signed in to change notification settings - Fork 540
Support multi-column-expr when doing a SELECT #4453
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
Conversation
A change to allow me to understand how multi_column_expr works. In the future I want to support:
which will used to deleting by a composite primary key. But this is not supported in sql-psi. |
val parentParent = parentRule.parent as SqlMultiColumnExpr | ||
|
||
// The first multiColumnExpression is the column list | ||
parentParent.multiColumnExpressionList[0].exprList[idx].type() |
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.
Can I assume this will not return null?
these two expressions are not optional.
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.
Yes
| bindLong(0, id) | ||
| bindString(1, name) |
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.
The types look right 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.
Very nice, thank you!
@Adriel-M Please run './gradlew :spotlessApply' to fix the code violations. |
@hfhbd linted |
@hfhbd btw, the linked issue wouldn't be resolved.
|
@Adriel-M yeah you are right, will reopen it. |
* Support multi-column-expr when doing a SELECT * lint
Supports sqldelight/sql-psi#411