EVICT
4min
The EVICT operation removes one or more documents from the local Ditto store, deleting them entirely without flagging (tombstone) as deleted to remote peers:
In this syntax:
- your_collection_name is the collection name from which you want to retrieve the data.
- [condition] represents the condition or criteria determining which documents should be evicted from the local peer.
To learn the best way to implement evict, see Best Practices.
Here, documents from the cars collection that have the document ID 123 get removed from the Ditto store:
As another example, the following snippet, once executed, results in the deletion of documents with timestamps greater than a certain value:
To remove a specific field from a document, use an UPDATE statement to tombstone that field. A tombstone is a flag signaling to remote peers that the DQL data type has been removed. (See UPDATE)
Updated 12 Mar 2024
Did this page help you?