-
Notifications
You must be signed in to change notification settings - Fork 674
Added support for ALTER OPERATOR syntax
#2114
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
src/parser/mod.rs
Outdated
| Keyword::MERGES => { | ||
| options.push(OperatorOption::Merges); | ||
| } | ||
| _ => unreachable!(), |
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 we return an error here instead?
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.
To future proof this, I have added:
[lints.clippy]
unreachable = "forbid"To the Cargo.toml, so it will be clearer. There are a few unreachable in the lib, I will go through them and change them into errors.
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.
Done, now unreachable patterns in the lib will trigger clippy. I have replaced all unreachable patterns with errors, or simplified them out when reasonable in their context.
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.
Awesome! Thank you!
iffyio
left a comment
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.
LGTM! Thanks @LucaCappelletti94!
As per title, this PR adds support for the
ALTER OPERATORsyntax, and simplifies a bit the existingCREATE OPERATORstruct to reduce the code duplication between the two statement representations in the AST.