delete

expect fun delete(document: Document)(source)

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

Parameters

document

The document.

Throws


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

Deletes a document from the database. 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 with 'false' value returned.

Parameters

document

The document.

concurrencyControl

The concurrency control.

Throws


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.

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