3 ms·
Have you considered a tagged template literal sql builder, such as https://github.com/blakeembrey/sql-template-tag https://github.com/blakeembrey/sql-template-t
by dsego 6y ago
Have you considered a tagged template literal sql builder, such as https://github.com/blakeembrey/sql-template-tag https://github.com/blakeembrey/sql-template-tag ?
Keeps the SQL syntax so less to learn, but still offers parametrized queries.
- fbn79 6y agoConsidered it, but I think that there are advantage in programmatically construct the query (see for example knex modify). Directly write down SQL or use template with sql make it harder. The only problem with knex is that it mutate at every operation instead of returning a new instance. I'm experimenting in wrapping it in a lazy monad that return a Fluture (https://github.com/FbN/iodio https://github.com/FbN/iodio)