3 ms·
I've been a huge fan of Slonik, https://github.com/gajus/slonik https://github.com/gajus/slonik, which makes it easy and safe to write direct SQL queries. The a
by hn_throwaway_99 5y ago
I've been a huge fan of Slonik, https://github.com/gajus/slonik https://github.com/gajus/slonik, which makes it easy and safe to write direct SQL queries. The author of Slonik had a good article about the downsides of query builders, previously discussed on HN, that I totally agree with: https://gajus.medium.com/stop-using-knex-js-and-earn-30-bf410349856c https://gajus.medium.com/stop-using-knex-js-and-earn-30-bf41...
- meitham 5y agoOn the contrary, I hate dealing with the various escaping characters for SQL, and to me SQLAlchemy expression is a life-saver. It gives me back a textual sql expression as a string and I can choose exactly how to run it. I do avoid the ORM part as I like to be in total control of the transaction, and I am often in the python async world, where ORM don't play nicely.
- hn_throwaway_99 5y ago> I hate dealing with the various escaping characters for SQL I don't understand that bit, with something like Slonik you don't use escape characters, it does it transparently for you by taking advantage of JavaScript's string template literals.