Version: 0.16.x

MongoDeltaSource

Provides the ability to insert delta snapshots into MongoDB collections and get base for conflict resolution

Type parameters#

Type

Hierarchy#

  • MongoDeltaSource

Index#

Constructors#

Properties#

Methods#

Constructors#

constructor#

+ new MongoDeltaSource(model: ModelDefinition, db: Db, deltaTTL: number): MongoDeltaSource

Defined in packages/graphback-datasync/src/deltaSource.ts:17

Parameters:

NameType
modelModelDefinition
dbDb
deltaTTLnumber

Returns: MongoDeltaSource

Properties#

Protected collectionName#

collectionName: string

Defined in packages/graphback-datasync/src/deltaSource.ts:16


Protected db#

db: Db

Defined in packages/graphback-datasync/src/deltaSource.ts:15


Protected deltaTTL#

deltaTTL: number

Defined in packages/graphback-datasync/src/deltaSource.ts:17

Methods#

findBaseForConflicts#

findBaseForConflicts(updateDocument: any): Promise‹Type›

Defined in packages/graphback-datasync/src/deltaSource.ts:46

Parameters:

NameType
updateDocumentany

Returns: Promise‹Type›


insertDiff#

insertDiff(updatedDocument: Type): Promise‹void›

Defined in packages/graphback-datasync/src/deltaSource.ts:34

Parameters:

NameType
updatedDocumentType

Returns: Promise‹void›