fnORM - a functional ORM
Let's face it: Node's ORMs are crap. Mostly at least. But JavaScript is an awesome language. So why. Because we did it wrong. To much class-ish stuff like backbone.
We want to fix this. This is the first idea for the API:
Initialisation
var fnORM = ; var store = ;
Creating Models/Collections/Whatever-you-call-them
... , we call it store
.
var userStore = // 'user' is the tablename
Fetch array of things
userStore;
We will support most of the lodash collections stuff. But lazy!
Fetch one thing
userStore;
Create one thing
userStore;
Update one thing
userStore;
Relations
postStore = postStore;
Hope you like it.
If you have any ideas, feel free to create a PR/Issue.