0.0.2 • Published 9 years ago

then-mongodb v0.0.2

Weekly downloads
4
License
Apache 2.0
Repository
github
Last release
9 years ago

then-mongodb

Let's use Promise/A+ to mongo driver!

Based on mongodb-core and when, to create a simple but easy to use interface for mongo.

And a simple auto-loadable model layer for easy app use.

Most UPDATES are in develop branch, the master branch will be merged until function test done.

This Project is still under DEVELOP! DO NOT USE IT until it get released!

Any suggest are welcome.

Modules

Mongodb object map

MongoDBMapThis Module
Server1:1Server
Collection1:1Model
Document1:1Entity

Server

Server is the base connection object to mongodb.

Any Operation with server need NameSpace, Operation as raw mode.

Model

Model with two function:

  1. A model class which just bind collection NS;
  2. A model loader which can (auto)load your models;

Before model promise do anything, they need a server to do it.

Any Operation with Model mapped to Collection.

Entity

Entity was made by model:

  1. New made by model(or just a object warped)
  2. Find from a model(like find from collection)

Any Operation with Entity mapped to Document.