Open cassiozen opened 6 years ago
No, the idea was to always use queries inline for readability.
Would you consider adding such a feature, under a different method name? (PR #72)
@cassiozen +1 I need it!
No, the idea was to always use queries inline for readability.
That seems like a very bad excuse. When building a data access layer it is very common to share queries, especially CTEs. Adding something like #72 also doesn't remove the ability to use queries inline.
I suggest .concat()
as a method name.
Currently
query.append
mutates the original query, which makes cumbersome to reuse a base query in multiple places.For example, this will not work - Every time the route handler gets called, a new WHERE segment will be appended to the original baseQuery:
Is there any immutable way of appending?