4 ms·
What I'm interested in is why write all of your code for a single database? Are there no query level abstractions for Nim? Even a basic ORM or even a query-buil
by gravypod 8y ago
What I'm interested in is why write all of your code for a single database? Are there no query level abstractions for Nim? Even a basic ORM or even a query-builder would allow portability across systems.
Writing for a single db is a bad idea.
- dom96 8y agoIndeed, Nim badly needs a good ORM library. Maybe you'd be interested in creating one? :)
- gravypod 8y agoORMs are extremely simple to implement. I've written them a few times in Java for simple things. Primarily you need something equivalent to reflection so you can read from and inject into any properties that an object might contain. Does Nim have this kind of feature set?
- dom96 8y agoI've never written one, I always thought it's one of those things that sound simple but actually require a lot of careful thought and design. Nim doesn't do reflection, but it has some of the best metaprogramming features including static introspection tools which are far superior to reflection IMO.
- gravypod 8y agoIt just takes some opinions. If you haven't developed any yet just take someone else's opinions. Eloquent is a good start for where to look. The QueryBuilder frame is a nice platform that makes available many nice features.
- syseng1002 8y ago> Writing for a single db is a bad idea. That's quite a bold statement. Abstractions are never free. Abstract too much and you end up with something slow, that uses the common subset of many databases, and requires very extensive testing.