Add ability to preserve order in MySQL ON DUPLICATE KEY UPDATE.#462
Closed
satori wants to merge 1 commit into
Closed
Add ability to preserve order in MySQL ON DUPLICATE KEY UPDATE.#462satori wants to merge 1 commit into
satori wants to merge 1 commit into
Conversation
In MySQL UPDATE behavior differs from standard SQL in the way that assignments are generally evaluated from left to right and old values being referenced in UPDATE are getting replaced one by one to their new values. This makes it important to have ability preserve exact order of columns in UPDATE clause. Change-Id: If508d8e26dbd3c55ab1e83cf573fb4021e9d091e
Owner
|
this looks like a really great pull request - thanks! I need to find time to review carefully. |
Owner
|
going to pull this into gerrit. |
Owner
|
the review is at https://gerrit.sqlalchemy.org/#/c/zzzeek/sqlalchemy/+/829 (my script to close this automatically didn't work) |
zzzeek
pushed a commit
that referenced
this pull request
Aug 15, 2018
Added support for the parameters in an ON DUPLICATE KEY UPDATE statement on MySQL to be ordered, since parameter order in a MySQL UPDATE clause is significant, in a similar manner as that described at :ref:`updates_order_parameters`. Pull request courtesy Maxim Bublis. Pull-request: #462 Change-Id: If508d8e26dbd3c55ab1e83cf573fb4021e9d091e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In MySQL UPDATE behavior differs from standard SQL in the way
that assignments are generally evaluated from left to right and
old values being referenced in UPDATE are getting replaced one by one
to their new values.
This makes it important to have ability preserve exact order of columns
in UPDATE clause.
Change-Id: If508d8e26dbd3c55ab1e83cf573fb4021e9d091e