4 ms·
Not really no, the lack of generics has hampered this as you can't easily return slices of arbitrary objects from an ORM so existing ORMs are pretty ugly. One w
by grey-area 5y ago
Not really no, the lack of generics has hampered this as you can't easily return slices of arbitrary objects from an ORM so existing ORMs are pretty ugly. One way round this at present is code generation.
From your comment I think you're talking about a query builder/executor though, which is a specific part of an ORM, they're pretty simple to build if that is your thing or there are a few examples of that out there. You're really just building up an sql string, storing params, adding a few helpers for things like joins and then executing.
I personally use a query generator to generate consistent queries, and generated code per resource to create models from results.