save

expect fun save(document: MutableDocument)(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document)

Saves a document to the default collection. When write operations are executed concurrently, the last writer will overwrite all other written values. Calling this method is the same as calling save(MutableDocument, ConcurrencyControl.LAST_WRITE_WINS)

Parameters

document

The document.

Throws


expect fun save(document: MutableDocument, concurrencyControl: ConcurrencyControl): Boolean(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document, concurrencyControl)

Saves a document to the default collection. When used with LAST_WRITE_WINS concurrency control, the last write operation will win if there is a conflict. When used with FAIL_ON_CONFLICT concurrency control, save will fail when there is a conflict and the method will return false

Return

true if successful. false if the FAIL_ON_CONFLICT concurrency

Parameters

document

The document.

concurrencyControl

The concurrency control.

Throws


expect fun save(document: MutableDocument, conflictHandler: ConflictHandler): Boolean(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document, conflictHandler)

Saves a document to the default collection. Conflicts will be resolved by the passed ConflictHandler

Return

true if successful. false if the FAIL_ON_CONFLICT concurrency

Parameters

document

The document.

conflictHandler

A conflict handler.

Throws

actual fun save(document: MutableDocument)(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document)

actual fun save(document: MutableDocument, conflictHandler: ConflictHandler): Boolean(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document, conflictHandler)
actual fun save(document: MutableDocument)(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document)

actual fun save(document: MutableDocument, concurrencyControl: ConcurrencyControl): Boolean(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document, concurrencyControl)

actual fun save(document: MutableDocument, conflictHandler: ConflictHandler): Boolean(source)

Deprecated

Use defaultCollection.save()

Replace with

defaultCollection.save(document, conflictHandler)