Skip to content

You are here: Sync API

Sync API

The Sync API is a hook that enables a client app on a user's device to access the functionality of the VoltMX Foundry 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
.create Enables you to create a record in a Sync object.
.deleteByPK Enables you to delete a record using the object's primary key.
.getAll Fetches all the records for a Sync object.
.getAllDetailsByPK Fetches a record using primary key value for a Sync object.
.getPendingAcknowledgement Enables you to fetch pending acknowledgment for a Sync object.
.getPendingUpload Enables you to fetch all the rows for a Sync object which are pending for upload.
.getXXX Retrieves all the records from the related object(XXX) corresponding to the current primary key.
.remove Enables you to delete a record for a Sync object using the where clause.
.rollbackPendingLocalChanges Enables you to rollback the object level pending changes which are not synchronized.
.rollbackPendingLocalChangesByPK Enables you to fetch all the records for a Sync object.
.update Enables you to update a record for a Sync object using a where clause
.updateByPK Enables you to update a record using the object's primary key.