c8osdkjscore › C8oFullSyncDatabase
Created by charlesg on 10/01/2017.
- C8oFullSyncDatabase
- _id
- c8o
- c8oFullSyncDatabaseUrl
- database
- databaseName
- pullFullSyncReplication
- pushFullSyncReplication
- remotePouchHeader
- remotedatabaseName
- syncFullSyncReplication
- to_cancel
- cancelPullReplication
- cancelPushReplication
- cancelSyncReplication
- checkResetBase
- deleteDB
- localDatabaseVersion
- remoteDatabaseVersion
- resetMyBase
- startAllReplications
- startPullReplication
- startPushReplication
- startReplication
- startSync
+ new C8oFullSyncDatabase(c8o: C8oCore, databaseName: string, fullSyncDatabases: string, localSuffix: string, localPrefix: string): C8oFullSyncDatabase
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:50
Creates a fullSync database with the specified name and its location.
throws C8oException Failed to get the fullSync database.
Parameters:
| Name | Type |
|---|---|
c8o |
C8oCore |
databaseName |
string |
fullSyncDatabases |
string |
localSuffix |
string |
localPrefix |
string |
Returns: C8oFullSyncDatabase
• _id: any
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:49
• c8o: C8oCore
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:21
Used to log.
• c8oFullSyncDatabaseUrl: string
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:30
• database: any = null
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:34
The fullSync Database instance.
• databaseName: string
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:28
The fullSync database name.
• pullFullSyncReplication: FullSyncReplication = new FullSyncReplication(true)
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:38
Used to make pull replication (uploads changes from the local database to the remote one).
• pushFullSyncReplication: FullSyncReplication = new FullSyncReplication(false)
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:42
Used to make push replication (downloads changes from the remote database to the local one).
• remotePouchHeader: any
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:48
• remotedatabaseName: string
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:29
• syncFullSyncReplication: FullSyncReplication = new FullSyncReplication()
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:46
Used to make pull replication (uploads changes from the local database to the remote one).
• to_cancel: any[] = []
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:50
• get getdatabase(): any
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:693
Returns: any
• get getdatabseName(): string
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:689
Returns: string
▸ cancelPullReplication(): void
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:720
cancel Pull Replication
Returns: void
▸ cancelPushReplication(): void
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:729
cancel Push Replication
Returns: void
▸ cancelSyncReplication(): void
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:738
cancel Sync Replication
Returns: void
▸ checkResetBase(): Promise‹void›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:155
Returns: Promise‹void›
▸ deleteDB(): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:697
Returns: Promise‹any›
▸ localDatabaseVersion(): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:136
Returns: Promise‹any›
▸ remoteDatabaseVersion(): Promise‹unknown›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:109
Returns: Promise‹unknown›
▸ resetMyBase(): Promise‹void›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:185
Returns: Promise‹void›
▸ startAllReplications(parameters: Object, c8oResponseListener: C8oResponseListener, handler: any, id: any, mutex: any): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:208
Start pull and push replications.
Parameters:
| Name | Type | Default |
|---|---|---|
parameters |
Object | - |
c8oResponseListener |
C8oResponseListener | - |
handler |
any | - |
id |
any | null |
mutex |
any | null |
Returns: Promise‹any›
Promise
▸ startPullReplication(parameters: Object, c8oResponseListener: C8oResponseListener, handler: any, id: any, mutex: any): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:221
Start pull replication.
Parameters:
| Name | Type | Default |
|---|---|---|
parameters |
Object | - |
c8oResponseListener |
C8oResponseListener | - |
handler |
any | - |
id |
any | null |
mutex |
any | null |
Returns: Promise‹any›
Promise
▸ startPushReplication(parameters: Object, c8oResponseListener: C8oResponseListener, handler: any, id: any, mutex: any): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:234
Start push replication.
Parameters:
| Name | Type | Default |
|---|---|---|
parameters |
Object | - |
c8oResponseListener |
C8oResponseListener | - |
handler |
any | - |
id |
any | null |
mutex |
any | null |
Returns: Promise‹any›
Promise
▸ startReplication(fullSyncReplication: FullSyncReplication, parameters: Object, c8oResponseListener: C8oResponseListener, handler: any, id: any, mutex: any): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:493
Starts a replication taking into account parameters.
This action does not directly return something but setup a callback raised when the replication raises change events.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
fullSyncReplication |
FullSyncReplication | - | - |
parameters |
Object | - | |
c8oResponseListener |
C8oResponseListener | - | - |
handler |
any | - | - |
id |
any | null | - |
mutex |
any | null | - |
Returns: Promise‹any›
▸ startSync(fullSyncReplication: FullSyncReplication, parameters: Object, c8oResponseListener: C8oResponseListener, handler: any, id: any, mutex: any): Promise‹any›
Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:243
Parameters:
| Name | Type | Default |
|---|---|---|
fullSyncReplication |
FullSyncReplication | - |
parameters |
Object | - |
c8oResponseListener |
C8oResponseListener | - |
handler |
any | - |
id |
any | null |
mutex |
any | null |
Returns: Promise‹any›