4 ms·
I think HugSQL[1] (Clojure library) has really opened my eyes to what DB interaction should be like. It’s not exactly an ORM, but it protects you from SQL injec
by notduncansmith 7y ago
I think HugSQL[1] (Clojure library) has really opened my eyes to what DB interaction should be like. It’s not exactly an ORM, but it protects you from SQL injection and makes it convenient to leverage the capabilities of your SQL database.
Also, his name is Usain Bolt[2].
[1] https://github.com/layerware/hugsql https://github.com/layerware/hugsql
[2] https://en.m.wikipedia.org/wiki/Usain_Bolt https://en.m.wikipedia.org/wiki/Usain_Bolt
- jareds 7y agoI've found Mybatis[1] to be a better alternative to Hibernate. At least with the version I was using you had to do complex mapping in XML instead of annotations which isn't great but I'll make the trade-off to avoid the ORM. Not sure if this is improved in 3.5. [1] https://github.com/mybatis/mybatis-3 https://github.com/mybatis/mybatis-3
- gigatexal 7y agoSure I am not saying crafting queries explicitly and preventing sql injection etc in code is elegant but it can be done and you can write super thin abstractions over the boring bits and still maintain a ton of power over your queries and know exactly what is going on without having to add another dependency. The one huge win for ORMs in my mind is the standing up of and the iteration of schemas, defining a schema and then summoning a database in alembic vernacular is really neat whereas one would have to manually manage a set of init scripts and migrations oneself. In the end there's no really clean way to do DB maintenance and work it's just work and has to be done, imo.