Class

GDBObjectStore

GDBObjectStore()

Implement the IndexedDB interface (put, get, delete) and the JDO interface(attach, detach) with respect to JavaScript instances and the remote store. Support transactional behaviour with asPatch.

Constructor

new GDBObjectStore()

View Source graph-database.js, line 674

Methods

abort()

Roll back changes in all attached objects.

View Source graph-database.js, line 909

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

View Source graph-database.js, line 933

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.

View Source graph-database.js, line 851

cleanObjects()

Set the state of all attached objects to clean.

View Source graph-database.js, line 961

delete(object)

Generate a deletion patch for the object and its reachable children

Parameters:
Name Type Description
object GraphObject

View Source graph-database.js, line 803

detach()

Unregister an object

View Source graph-database.js, line 886

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

View Source graph-database.js, line 732

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

View Source graph-database.js, line 695