syncGeodatabaseWithSyncDirection method

SyncGeodatabaseJob syncGeodatabaseWithSyncDirection({
  1. required SyncDirection syncDirection,
  2. required bool rollbackOnFailure,
  3. required Geodatabase geodatabase,
})

Returns a job to synchronize a geodatabase back to its source ArcGIS feature service using the specified sync direction and rollback on failure boolean value.

If the given sync direction is not compatible with the geodatabase sync task's feature service, the returned job will fail.

You should not execute more than one sync on a particular geodatabase at the same time. This includes any operations that export or import deltas from the local Geodatabase, which are:

Parameters:

  • syncDirection — Sync direction to use when syncing the geodatabase.
  • rollbackOnFailure — True to rollback all changes to the service and/or the geodatabase if the job fails, false to accept any of the changes up until the point when the job fails.
  • geodatabase — The geodatabase to sync.

Return Value: A job to synchronize a geodatabase.

Implementation

SyncGeodatabaseJob syncGeodatabaseWithSyncDirection({
  required SyncDirection syncDirection,
  required bool rollbackOnFailure,
  required Geodatabase geodatabase,
}) {
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_GeodatabaseSyncTask_syncGeodatabaseWithSyncDirection(
      _handle,
      syncDirection.coreValue,
      rollbackOnFailure,
      geodatabase._handle,
      errorHandler,
    );
  });
  return SyncGeodatabaseJob._fromHandle(
    objectHandle,
  )!;
}