Company
Date Published
Author
Andrew Israel
Word count
1799
Language
English
Hacker News points
None

Summary

The author discusses their experience and preferences in choosing database libraries for writing example applications at PropelAuth, emphasizing the importance of minimizing the abstraction between code and SQL to maintain clarity and safety. They express a preference for libraries like SQLx, PgTyped, and JDBI, which allow direct SQL writing while providing safety features such as compile-time checking and type interfaces. Additionally, the author mentions alternatives like query builders jOOQ and Drizzle, which maintain a small gap between code and SQL. They also note the trade-offs of using raw SQL, such as reduced portability and increased verbosity, suggesting that the choice of database library should consider the complexity of queries needed and the potential benefits of using ORMs for simpler CRUD operations.