Closed nodefish closed 5 years ago
sql.booleanExpression
was removed in favour of sql.join
but the article has not been updated.
See feat: remove multiple methods in favor of sql.join
The doc link is now https://github.com/gajus/slonik#slonik-query-building-sql-join
I know you want to discourage dynamic queries, but surely they should have some support in
Slonik
that is safer thansql.raw
and doesn't make me leaveSlonik
's API completely in favor of a query builder likesqorn
.I find myself doing things like this...
...and subsequently either using
sql.raw
for everything at the last stage when I combine the fragments, or fighting againstSlonik
in an attempt to get some safety, e.g. trying to addSlonik
safety like:Would it be possible to provide something like a
join
method on the output object of tagged template literals or something along those lines in order to enhance composability? I'm not actually sure what a good solution would look like, but I feel like composability without totally losing safety is a reasonable goal for this project given that's supposed to be its main strength compared to using node-pg.