The Protevus Platform: Unified Full-Stack Development https://protevus.com
Find a file
2016-06-23 00:58:21 -04:00
.idea Need to eventually upgrade all plugins to JSON God v2 2016-06-21 16:34:52 -04:00
lib Functionality done 2016-06-23 00:58:21 -04:00
test Functionality done 2016-06-23 00:58:21 -04:00
.gitignore Will be done soon 2016-05-09 18:51:07 -04:00
LICENSE Initial commit 2016-05-09 17:16:44 -04:00
pubspec.yaml Need remove, sort, docs 2016-06-22 14:34:28 -04:00
README.md Functionality done 2016-06-23 00:58:21 -04:00

angel_mongo

version 1.0.0-dev

MongoDB-enabled services for the Angel framework.

Installation

Add the following to your pubspec.yaml:

dependencies:
  angel_mongo: ^1.0.0-dev

Usage

This library exposes three main classes: Model, MongoService and MongoTypedService<T>.

Model

Model is class with no real functionality; however, it represents a basic MongoDB document, and your services should host inherited classes.

@Hooked()
class User extends Model {
  String username;
  String password;
}

MongoService

This class interacts with a DbCollection (from mongo_dart) and serializing data to and from Maps.

MongoTypedService

Does the same as above, but serializes to and from a target class using json_god and its support for reflection.

See the tests for more usage examples.