Constructor
new GDBObjectStore()
Methods
asPatch()
Collect and return all accumulated patches in the process, convert from abstract form
{put: [], post: [], delete: []}
where each array entry is
[identifier, propertyName, value]
to capture the respective operation on the identifier object
attach()
Register an object - and its reachability graph, to cause any changes within a transaction to propagate to the remote store when the transaction commits.
cleanObjects()
Set the state of all attached objects to clean.
delete(object)
Generate a deletion patch for the object and its reachable children
Parameters:
Name | Type | Description |
---|---|---|
object |
GraphObject |
get(key)
Retrieve an object's state given either an identifier, or an object prototype An identifier is used as the subject constraint for a get, while a prototype is used to inform a describe. Use the store's revision proerty to constraint the request in order to suport rollforward/rollback
Parameters:
Name | Type | Description |
---|---|---|
key |
Object | string |
put(object)
Transfer an object's state to the remote store. The state is staged as a patch in a GraphRequest, which is added to this store's collection and returned to the application. Once control returns to the promise, the patch is collected and once all requests are processed, the collected patched are commited.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object |