Chainable Query Builder with select #3341
mikegrogan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I started playing around with the chainable query builder (https://guides.wheels.dev/v4-0-0/basics/query-builder-and-scopes/), and it seems to be working well. Might like this better than findall() at some point. However, I find myself wanting to still limit the fields down to just what is needed. Select doesn't seem to be chainable?
Something like this
model("person")
.select("firstname,lastname,email")
.where("id","1234")
.get();
I see some Rails has some docs on their implementation.
https://guides.rubyonrails.org/active_record_querying.html#selecting-specific-fields
All reactions