-
Notifications
You must be signed in to change notification settings - Fork 18
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
encode param as pg array #49
Conversation
Hmmm ... maybe we support:
Then you would not need |
if we introduce with conn.query("select * from products where supplier_id = ? and category_ids && ?", 127, conn.array([12, 24, 67]))
|
understood, my thinking is that |
Is there any downside to doing this 100% automatically, if we see an Array in the param we just use encode array? What can break with a change like that? |
ANY/SOME (array) support only postgres postgres on planning step, rewrites explain analyze select id from suppliers where id in (12, 24, 67);
Bitmap Heap Scan on suppliers (cost=2.97..6.57 rows=3 width=4)
-> Bitmap Index Scan on suppliers_pkey (cost=0.00..2.96 rows=3 width=0)
Index Cond: (id = ANY ('{12,24,67}'::bigint[])) i think on pg connection good idea automatically use encode array, but then, we won't be able to use |
Hello @SamSaffron, I added Rails is doing similar work rails/rails#49388 |
No description provided.