Skip to main content

Home > git-documentdb > GitDocumentDB > sync

GitDocumentDB.sync() method#

Synchronize with a remote repository

Signature:
sync(options: RemoteOptions, getSyncResult: boolean): Promise<[Sync, SyncResult]>;

Parameters#

ParameterTypeDescription
optionsRemoteOptions
getSyncResultboolean
Returns:

Promise<[Sync , SyncResult ]>

Remarks#

Register and synchronize with a remote repository. Do not register the same remote repository again. Call unregisterRemote() before register it again.

Exceptions#

Err.RemoteAlreadyRegisteredError

Err.DatabaseClosingError

Err.RepositoryNotOpenError

Errors from constructor of Sync class.

Errors from Sync.init()