Click or drag to resize

DatabaseDelete Method (Document, ConcurrencyControl)

Deletes the given Document from this database

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0713
Syntax
C#
public bool Delete(
	Document document,
	ConcurrencyControl concurrencyControl
)

Parameters

document
Type: Couchbase.LiteDocument
The document to save
concurrencyControl
Type: Couchbase.LiteConcurrencyControl
The rule to use when encountering a conflict in the database

Return Value

Type: Boolean
true if the delete succeeded, false if there was a conflict
Exceptions
ExceptionCondition
CouchbaseExceptionThrown if an error condition is returned from LiteCore
CouchbaseLiteExceptionThrown with InvalidParameter when trying to save a document into a database other than the one it was previously added to
CouchbaseLiteExceptionThrown with NotFound when trying to delete a document that hasn't been saved into a Database yet
InvalidOperationExceptionThrown if this method is called after the database is closed
See Also