10 ms·
What do you think of "micro ORMs" like knex.js, or Dapper for C#? I personally agree with you and my personal projects just use stored procedures, but these mic
by droobles 4y ago
What do you think of "micro ORMs" like knex.js, or Dapper for C#? I personally agree with you and my personal projects just use stored procedures, but these micro orms have always piqued my interest since they're just a SQL abstraction for building single queries.
- jiayo 4y agoI would consider those "query builders" rather than fully fledged ORMs.
- notfed 4y agoYeah no. A micro ORM still expects you to write the full, raw SQL. The raison d'etre for a micro ORM is to capture the results of that SQL query into a simple, flat collection of objects in a way that has a better UX than your framework's default behavior. Micro ORMs are the perfect middle ground for debates like these.
- skeeter2020 4y agoThis is typically as far as I go with an ORM, CRUD operations on single tables that give you some type safety at compile time. If you need more complex data shapes I usually create a view or occasional stored procedure but that's about it. I use Entity Framework in my day job and do like the migrations though...
- dgb23 4y agoI personally like those. They are qualitatively different from ORMs. They give you three things: - sensible ways of composing queries beyond direct string concatenation - safe parametrization - return results into usable data structures (not objects) None of these things carry the problems of ORMs. They don’t impose a paradigm that isn’t SQL. They simply let you interface with SQL in an ergonomic manner.