exportDelta static method
- required Geodatabase geodatabase,
- required Uri outputUri,
Generates an upload delta geodatabase file containing all the changes since the last sync.
A delta geodatabase contains the changes that have occurred since a mobile replica Geodatabase was last-synchronized with the feature service. See Synchronize Replica for an overview of the delta files used in synchronization. An "upload" delta geodatabase contains the local edits, performed on the user's device, to be sent to the originating feature service.
When you run this task, any local edits in the Geodatabase will be exported to the specified output path. The output path should include the full path and file name (ending in ".geodatabase") for the export.
The delta file created by this method is not sent to the server and has no impact on any subsequent sync job. You can call this method repeatedly without affecting the state of the local geodatabase.
The task returned by this method has a boolean result that indicates whether or not a delta geodatabase was created.
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:
- GeodatabaseSyncTask.exportDelta
- GeodatabaseSyncTask.importDelta
- SyncGeodatabaseJob
- OfflineMapSyncJob
Parameters:
geodatabase
— The geodatabase to generate a delta from.outputUri
— The path and filename to save the generated delta to.
Return Value: A task that generates a geodatabase delta and has an element type of bool. This bool indicates whether a delta was generated or not.
Implementation
static Future<bool> exportDelta({
required Geodatabase geodatabase,
required Uri outputUri,
}) {
_initializeArcGISEnvironmentIfNeeded();
final coreOutputUri = _CString(outputUri.toFilePath());
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_GeodatabaseSyncTask_exportDeltaAsync(
geodatabase._handle,
coreOutputUri.bytes,
errorHandler,
);
});
return taskHandle.toFuture(
(element) => element.getValueAsBool()!,
);
}