An abstraction of a collection of objects in a database. Collections are HTTP wrappers around a Store
. You can access or create a store the same way.
var myStore = process.server.createStore('my-store');
You shouldn't construct Store
s directly. Instead use the process.server.createStore() method.
object
{Object}The data to insert into the store.
fn(err, result)
{Function}Called once the insert operation is finished.
query
{Object}Only count objects that match this query.
fn(err, count)
{Function}Called once the count operation is finished. count
is a number.
query
{Object}Only returns objects that match this query.
fn(err, results)
{Function}Called once the find operation is finished.
query
{Object}
fn(err, result)
{Function}
Find the first object in the store that match the given query.
query
{Object}
changes
{Object}
fn(err, updated)
{Function}
Update an object or objects in the store that match the given query only modifying the values in the given changes object.
query
{Object}
fn(err, updated)
{Function}
Remove an object or objects in the store that match the given query.
Let us know if you have any ideas to improve our docs. Open an issue on github, send us an email, or tweet us.
This entire site, including documentation written in markdown is available on github. Pull requests are appreciated!