-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add RETURNING
support for MariaDB 10.5.1+
#201
Conversation
dc036df
to
86c4f6b
Compare
86c4f6b
to
e032ef9
Compare
11e1501
to
f2e3c2d
Compare
Currently, it is simplify to add Perhaps the statement parser needs to be rewritten to support checking whether the statement supports |
I think the current change is suitable for merging, as MariaDB will naturally return a syntax error in case of incorrect |
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 👍
8482577
to
b7e2f4a
Compare
Columns should not be quoted, it can be an expression. e.g. If we quoted it, like in the example above it would be Keep columns raw and let ORM/QueryBuilder handle it. |
b7e2f4a
to
773c69e
Compare
@jchrys It is foreseeable that this PR will change the behavior of For example, if a user is using |
I agree. 😄 |
773c69e
to
8007fa0
Compare
Motivation:
Add
RETURNING
clause support for MariaDB 10.5.1+ .See also #177 .
Modification:
Add
RETURNING
clause inMySqlStatement#returnGeneratedValues
and query message packets.Result:
For MariaDB 10.5.1 and above,
MySqlStatement#returnGeneratedValues
will useRETURNING
clause instead ofLAST_INSERT_ID
.Notice:
For MariaDB 10.5.0 and below,
MySqlStatement#returnGeneratedValues
will still useLAST_INSERT_ID
due to these versions do not supportRETURNING
clause.