-
Notifications
You must be signed in to change notification settings - Fork 221
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
the exec order of korma update set-fields #364
Comments
I'm afraid it is not possible to control the order of columns to update. The reason why columns are ordered is to generate consistent SQL across different Clojure versions. Can you elaborate on reasons why the order makes difference in MySQL? |
hi, I'm finding myself exactly in this situation. |
@avabinary This issue is about order of columns, I think you are talking about order of rows. It should be fairly straightforward to make update support order-by, pull request welcome :) |
@immoh would passing a I'm going through old issues and trying to clean them up. Has this issue persisted? If there hasn't been a response to this issue in 2 weeks, I'll close the ticket. |
@venantius I don't think it would. Korma is explicitly ordering column names so that generated SQL is same across Clojure versions. |
(def my-map
{:a 1
:b 2}
(->(update* table)
(set-field my-map)
(exec)
)
it seems that korma will always exec in an order like this "set a=1 and b=2",because letter a is always ahead of letter b。
my question is that are there any methods that can make korma exec like this "set b=2 and a=1"。because the set sequence make different in mysql.Thanks a lot!
The text was updated successfully, but these errors were encountered: