3 ms·
Would that be a "RRM" (Record-Relational mapper)? If so we're already on board (in a different language). P.S. I bet you would never guess which typed language
by spion 7y ago
Would that be a "RRM" (Record-Relational mapper)? If so we're already on board (in a different language).
P.S. I bet you would never guess which typed language with great support for records makes it easy (for the most part) to build most type-safe SQL queries on the fly, even with projections, without explicitly defining types for every possible projection variation.
- zbentley 7y agoLots of Python codebases are on board with that (and I assume codebases in other languages are as well). It's by convention rather than language-level support, but works perfectly well: don't bolt business logic onto your ORM classes' methods, handle those elsewhere in a separate layer whose conventions you define. Works great.
- joshlemer 7y agoWould you happen to be talking about TypeScript?
- spion 7y agoyes
- mpajunen 7y agoAny TypeScript libraries you are using?
- spion 7y agoWe used https://github.com/brianc/node-sql https://github.com/brianc/node-sql but it unfortunately stopped being maintained, so now we maintain our own fork.
- thoman23 7y agoI get that you're talking about Typescript, but I just want to say that Scala excels in this area as well. I found Slick to be a pleasure to work with once I embraced not trying to map directly from a relational model to an object model, but instead to just use Scala's ability to manipulate and reshape the relational model as needed.
- bunderbunder 7y agoI've come to appreciate that model, too. Somewhere in one of his talks, Rich Hickey goes on this great mini-rant about, "Why can't we just let data be data?" I wish I could remember exactly which one it is. Maybe "Simple Made Easy"?