Skip to content
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

Support User-Defined Variables for mysql #81

Merged
merged 6 commits into from
Jun 30, 2024

Conversation

YuMuuu
Copy link

@YuMuuu YuMuuu commented Jun 29, 2024

For mysql (and mariadb), variables @foo can now be defined as user-defined functions.

specification

@@ -4457,7 +4457,15 @@ set_stmt
}

set_assignment
= name:((ident / paren$list$ident) __) "=" value:(__ expr) {
= &mysql name:((ident / variable / paren$list$ident / paren$list$variable) __) "=" value:(__ expr) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only mysql setting

@nene
Copy link
Owner

nene commented Jun 30, 2024

Thanks for the PR. Though I don't really understand what you mean by:

variables @foo can now be defined as user-defined functions.

I don't see anything related to functions in this PR.

@nene nene merged commit 7b6f4e2 into nene:master Jun 30, 2024
1 check passed
@YuMuuu
Copy link
Author

YuMuuu commented Jun 30, 2024

my friend corrected the sentence:

This PR supports the user-defined variables syntax in mysql and mariadb.

@YuMuuu YuMuuu deleted the support-mysql-set-syntax branch June 30, 2024 09:38
@YuMuuu
Copy link
Author

YuMuuu commented Aug 5, 2024

@nene
I would like to use this change in prettier-plugin-sql-cst.
Please tell me the release schedule?

@nene
Copy link
Owner

nene commented Aug 5, 2024

Hey, Thanks for the reminder.

I've released 0.28.1 and also did a release of the prettier plugin to use the updated parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants