You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** A wrapper around a 'syncAction' function that syncs data to a destination.
181
-
* This function loads the items from storage for 'syncAction' and is called back if the data transfer is successful or not.
182
-
* If the transfer is successful, the items in storage are updated to reflect that a sync has occurred.
183
-
* @template E the local collection data model. This type should contain deleted, synched, and last modified properties corresponding to the prop names passed to the constructor
184
-
* @template F the local collection data model with optional properties. This type should contain deleted, synched, and last modified properties corresponding to the prop names passed to the constructor
185
-
* @template R the 'syncAction' response type
186
-
* @template S the remote data model. This type should contain deleted, synched, and last modified properties corresponding to the prop names passed to the constructor
187
-
* @param dfd deferred object to reject or resolve once 'syncAction' has completed or failed
188
-
* @param table the data source where data can be updated or retrieved
189
-
* @param primaryKey the table data model's primary key, this or 'primaryKeys' must not be null, 'primaryKey' takes recedence
190
-
* @param primaryKeys the table data model's primary keys, this or 'primaryKey' must not be null
191
-
* @param syncAction the action which performs the data sync
Copy file name to clipboardExpand all lines: sync/SyncDataCollection.ts
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -46,8 +46,12 @@ class SyncDataCollection {
46
46
* @param [notifyActionEnd] optional event listener type function which is called whenever a sync action finishes, see {@link SyncAction}. Note: this method is only called if the action is successful, see 'notifyActionFailure'
47
47
* @param [notifyActionFailure] optional event listener type function which is called whenever a sync action fails, see {@link SyncAction}
/** A utility function for picking a 'SyncDownOp' based on a set of flags describing the desired syncing behavior
472
479
* @param clearData true if all existing local data should be deleted before syncing down new data, false to keep local data (with some cavets)
473
480
* @param removeDeletedData true to remove local data marked deleted (based 'isDeletedPropName' values of true) before syncing down new data, false to keep deleted data
0 commit comments