Sofa the Couchbase ODM
This project is a driver for the NodeJS NoSQL ODM, visit this repository for further informations.
Current version: [v/0.1.8][dist]
Getting started
npm install sofa-odm --save
Sample code
var sofa = ;var session = ;// handles all errorssession;// declare a user mapper attached to current sessionvar users = sessiondeclare'user' // declare properties properties: name: type: 'string' // data type : string, number, boolean, array, object validate: 4 64 // validators, depends on data type email: type: 'string' validate: /S+@S+\.S+/ unique: true password: type: 'string' validate: 6 24 ;// connect to couchbasesession;
Misc
This code is distribute under The MIT License (MIT), authored by Ioan CHIRIAC.