Skip to content
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

ActiveRecord::Base.connection.select raises TypeError with makara-0.5.1 #326

Open
j-miyake opened this issue Jul 14, 2021 · 1 comment
Open

Comments

@j-miyake
Copy link

With makara-0.5.1, ActiveRecord::Base.connection.select raises TypeError, while it returns ActiveRecord::Result with makara-0.5.0.

with makara-0.5.1

pry(main)> ActiveRecord::Base.connection.select("select * from users limit 1")
TypeError: wrong argument type String (expected Array)

with makara-0.5.0

pry(main)> ActiveRecord::Base.connection.select("select * from users limit 1")
=> #<ActiveRecord::Result:0x000000000c2350d0
@jeremy jeremy mentioned this issue Aug 25, 2021
@jeremy
Copy link
Contributor

jeremy commented Aug 25, 2021

Confirmed. There's a regression here: https://github.com/instacart/makara/pull/283/files#r695483360

In Makara 0.5.1, #select is now calling the private Kernel#select on the ConnectionWrapper instead of hitting method_missing to talk to the connection adapter itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants