le-storage-service
v2.9.1
Published
A simple ORM for real-time datastores
Downloads
18
Readme
le-storage-service
A simple ORM for real-time datastores
This service and the objects it creates rely heavily on promises for asynchronous tasks. A storage provider (such as le-storage-provider-firebase) is required when constructing the storage object.
Installation
npm install le-storage-service --save
Usage
var StorageProvider = require('le-storage-provider-firebase');
var provider = new StorageProvider(/* your firebase url */);
var StorageService = require('le-storage-service');
var storage = new StorageService(provider);
var castle = storage.createRecord('Company');
castle.update({name: 'Castle', industry: 'Real Estate', founded: 2014})
.then(function () {
...
});
Tests
npm test
to run unit tests oncegulp tdd
to run unit tests on every file changegulp coverage
to run unit tests and create a code coverage report
Contributing
Please follow the project's conventions or your changes will not be accepted
Release History
- 2.0.3 Prefer
reject
tothrow
for functions that return promises - 2.0.2 Remove
data
fromCollectionService
'sload
in docs - 2.0.1 Allow
sync
andload
of empty collections - 2.0.1 Allow
sync
andload
of empty collections - 2.0.0 Purge
has
from the api- Rename
hasOne
torelateToOne
- Rename
hasMany
torelateToMany
- Rename
hasType
tosetType
andaddType
for one and many, respectively
- Rename
- 1.0.0 Add RecordService and CollectionService
- 0.1.3 Configure Travis CI to publish docs to GitHub Pages
- 0.1.2 Add Dependency Status Badge
- 0.1.1 Add Travis CI
- 0.1.0 Initial release