Skip to content

Latest commit

 

History

History
397 lines (230 loc) · 12.2 KB

File metadata and controls

397 lines (230 loc) · 12.2 KB

c8osdkjscoreC8oFullSyncDatabase

Class: C8oFullSyncDatabase

Created by charlesg on 10/01/2017.

Hierarchy

  • C8oFullSyncDatabase

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ 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

Properties

Private _id

_id: any

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:49


Private c8o

c8o: C8oCore

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:21

Used to log.


Private c8oFullSyncDatabaseUrl

c8oFullSyncDatabaseUrl: string

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:30


Private database

database: any = null

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:34

The fullSync Database instance.


Private databaseName

databaseName: string

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:28

The fullSync database name.


Private pullFullSyncReplication

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).


Private pushFullSyncReplication

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).


Private remotePouchHeader

remotePouchHeader: any

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:48


Private remotedatabaseName

remotedatabaseName: string

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:29


Private syncFullSyncReplication

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).


Private to_cancel

to_cancel: any[] = []

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:50

Accessors

getdatabase

get getdatabase(): any

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:693

Returns: any


getdatabseName

get getdatabseName(): string

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:689

Returns: string

Methods

cancelPullReplication

cancelPullReplication(): void

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:720

cancel Pull Replication

Returns: void


cancelPushReplication

cancelPushReplication(): void

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:729

cancel Push Replication

Returns: void


cancelSyncReplication

cancelSyncReplication(): void

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:738

cancel Sync Replication

Returns: void


checkResetBase

checkResetBase(): Promise‹void›

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:155

Returns: Promise‹void›


deleteDB

deleteDB(): Promise‹any›

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:697

Returns: Promise‹any›


localDatabaseVersion

localDatabaseVersion(): Promise‹any›

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:136

Returns: Promise‹any›


remoteDatabaseVersion

remoteDatabaseVersion(): Promise‹unknown›

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:109

Returns: Promise‹unknown›


resetMyBase

resetMyBase(): Promise‹void›

Defined in c8osdk-js-core/src/c8o/fullSyncDatabase.ts:185

Returns: Promise‹void›


startAllReplications

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

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

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


Private startReplication

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›


Private startSync

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›