3 ms·
For years now, I’ve been using a query builder that supports migrations and basic, non-instanced “model” functions that represent the cases of fetching and modi
by samtho 3y ago
For years now, I’ve been using a query builder that supports migrations and basic, non-instanced “model” functions that represent the cases of fetching and modifying data as required by my application.
This allows me to have as much to data access as I need in easy-to-stub methods, without an overly opinionated ORM stepping in. The query builder does its job to simply build queries I ask of it and I don’t have to worry about a gigantic piece of code liability. I really tend to avoid using a library for everything these days and using libraries that do far too much (and if I do, I limit exposure by wrapping calls to it in functions I create).