-
Notifications
You must be signed in to change notification settings - Fork 6
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
PostgreSQL support #5
Comments
Thanks for the hint :) |
@khiav223577 sorry, don't have time right now :( |
It's OK. Thanks for your hint again :) |
Just submitted a PR for this. - #7 |
|
@khiav223577 Hey, is there any solution to support pgsql uuid type? |
@darcang |
@khiav223577 yeah, i got this working for PG >= 9.5 using User.where(id: ids)
.order(Arel.sql("array_position(ARRAY['#{ids.join("','")}']::uuid[], users.id)")) |
@khiav223577 nice, great thx! |
Hello. Looks like this gem will not work in PostgreSQL, only MySQL (no support for
ORDER BY FIELD()
). You can use something like this for PostgreSQL:example:
The text was updated successfully, but these errors were encountered: