To remove a document from a Edge SDK device without permanently deleting it see
EVICT.When using
DELETE ensure that devices running Ditto Edge SDK are on version 4.10.1 and later.For more information on how to use delete and manage data reach out to Ditto’s Customer SupportWhen using
DELETE on Edge SDKs-Only deployments reach out to Ditto’s Customer Support to ensure the
best design patterns are being used to avoid data loss and/or performance related issues.DELETE operation permanently removes one or more documents from a Ditto collection. Once a document is
deleted it cannot be recovered. Deleted documents can be re-created by using the INSERT operation with
the same document id as the deleted document.
Syntax
DQL
your_collection_nameis the name of the collection from which you want to retrieve the data.[condition]represents the condition or criteria that determine which documents should be evicted from the local peer.[order by]represents the path within a document to use to order the dataset and order (ASCorDESC).[limit]represents the maximum number of documents that should be evicted.[offset]represents the offset from 0 that should be used for the eviction query, in practice this should be rarely used.
Examples of Deleting Documents
Here, the document with ID123 is permanently removed from the cars collection:
DQL
DQL
Using DQL to Delete Documents in the Edge SDK
For specifics on deleting documents Ditto SDKs seeSDK>CRUD>Removing Documents.
TOMBSTONE Keyword
TheTOMBSTONE keyword (currently Ditto Server only) is a synonym for the new DELETE keyword. Users using the TOMBSTONE keyword will get the auto
cleanup properties of DELETE without any changes.TOMBSTONE will be deprecated/removed in an upcoming Major release.
Removing Fields from Documents
TheDELETE keyword is used to remove documents from a collection. To remove a
specific field from a document see Update > Deleting
Fields.