delete

expect fun delete()(source)

Deletes a database. Deleting a database will stop all replicators, live queries and all listeners attached to it. Although attempting to close a closed database is not an error, attempting to delete a closed database is.

Throws

Throws an exception if any error occurs during the operation.


expect fun delete(document: Document)(source)

Deprecated

Use defaultCollection.delete()

Replace with

defaultCollection.delete(document)

Deletes a document from the default collection. When write operations are executed concurrently, the last writer will overwrite all other written values. Calling this function is the same as calling delete(Document, ConcurrencyControl.LAST_WRITE_WINS)

Parameters

document

The document.

Throws


expect fun delete(document: Document, concurrencyControl: ConcurrencyControl): Boolean(source)

Deprecated

Use defaultCollection.delete()

Replace with

defaultCollection.delete(document, concurrencyControl)

Deletes a document from the default collection. When used with lastWriteWins concurrency control, the last write operation will win if there is a conflict. When used with FAIL_ON_CONFLICT concurrency control, delete will fail and the method will return false.

Parameters

document

The document.

concurrencyControl

The concurrency control.

Throws

actual fun delete()(source)

actual fun delete(document: Document)(source)

Deprecated

Use defaultCollection.delete()

Replace with

defaultCollection.delete(document)
actual fun delete()(source)

actual fun delete(document: Document)(source)

Deprecated

Use defaultCollection.delete()

Replace with

defaultCollection.delete(document)

actual fun delete(document: Document, concurrencyControl: ConcurrencyControl): Boolean(source)

Deprecated

Use defaultCollection.delete()

Replace with

defaultCollection.delete(document, concurrencyControl)