WORK IN PROGRESS This Page describes the interface a store implementation needs to provide full [Storage functionality][Storage] to applications. This interface does not have to be provided as a CommonJS module - any JavaScript object or scope implementing the functions described below will work. * all(type) - get all objects of one type * get(type, id) - get a single object for its id * query() - get a query object * getEntity(key|properties) - get an entity object * getKey(entity) - get the key object * getProperties(entity) - get the properties object * equalKeys(key1, key2) - check if keys are equal * save(props, entity) - save object to db * remove(key) - remove object from db * getId(key) - get the object id The store object is passed as first argument to the [Storable.defineEntity] method. The second and optional third arguments are the type name and type mapping information provided by the application. The store's `defineEntity()` method returns a JavaScript constructor that can be used to create, retrieve, update, and delete persistent objects of this type as described on the [Storage] main page. [Storable class]: http://github.com/ringo/ringojs/blob/master/src/org/ringojs/wrappers/Storable.java [Storable.defineEntity]: http://github.com/ringo/ringojs/blob/master/src/org/ringojs/wrappers/Storable.java#L88
Are you human? (yes/no)
cancel
|
markdown help
Revision history:
v
→
v
→
v
→
v
→
v
→
v
→
v
→
v
→
v
→ Version
Home
Getting Started
Downloads
Screencasts
Documentation
API Master
API v0.8
Wiki
All Pages
Recent Changes
Contributing
Source Code
Community