You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
Please don't. Issues are not meant to be stackoverflow - SO is meant to be SO. You can also ask questions in google groups etc, but issues are meant for bug reports, feature requests, etc
Well let me form this as an issue/feature request, squeel lacks the composability that arel has, as far as I can see, and it would make the library much more useful.
Currently I'm doing 3 queries which I could combine. The additional sql constraints are generated depending on the input of the program.
@txdv Thank you for the post first, Squeel wants to leverage the power of Arel, but it combines to ActiveRecord tighter. It's hard to say how important we need to get a SQL string of a predicate. In ActiveRecord, to_sql is not as simple as Arel, many things hides to users, for example, generate proper alias for joined tables and their where clauses. In my personal opinion, partial queries are the role of scopes in ActiveRecord or sifts in Squeel. It's not hard to create a reuseable partial query in either way. Don't consider to_sql for partial queries :)
I posted this question on stack overflow http://stackoverflow.com/questions/25668941/create-partial-queries-with-squeel
For better visibility I'll just add an issue.
The text was updated successfully, but these errors were encountered: