Sync API

The Sync API is a hook that enables a client app on a user's device to access the functionality of the Quantum Fabric Sync ORM API through a server-side app.

The Sync API contains the following API elements:

sync Namespace

Function Description
sync.getPendingAcknowledgement Fetches pending acknowledgment for all objects.
sync.getPendingUpload Fetches all the rows for all objects those are pending for upload.
sync.init Used to initialize the creation of device database for sync.
sync.reset Resets the device database to initial state.
sync.rollbackPendingLocalChanges Used to roll back the application level pending changes which are not synchronized.
sync.startSession Used to start the sync process and download the data from the Enterprise Data Source to the device database.

Sync Object

Method Description
<syncObject>.create Enables you to create a record in a Sync object.
<syncObject>.deleteByPK Enables you to delete a record using the object's primary key.
<syncObject>.getAll Fetches all the records for a Sync object.
<syncObject>.getAllDetailsByPK Fetches a record using primary key value for a Sync object.
<syncObject>.getPendingAcknowledgement Enables you to fetch pending acknowledgment for a Sync object.
<syncObject>.getPendingUpload Enables you to fetch all the rows for a Sync object which are pending for upload.
<syncObject>.getXXX Retrieves all the records from the related object(XXX) corresponding to the current primary key.
<syncObject>.remove Enables you to delete a record for a Sync object using the where clause.
<syncObject>.rollbackPendingLocalChanges Enables you to rollback the object level pending changes which are not synchronized.
<syncObject>.rollbackPendingLocalChangesByPK Enables you to fetch all the records for a Sync object.
<syncObject>.update Enables you to update a record for a Sync object using a where clause
<syncObject>.updateByPK Enables you to update a record using the object's primary key.