Type of the document.
Document must implement DocumentContract.
Get the number of documents in the Collection.
Total number of documents.
Returns the indexed properties.
Iterate over Collection documents.
Clear the Collection by removing all documents.
Emits DocumentNotification with operation DocumentOperation.CLEARED and documents null
.
After clearing you can add new documents.
Create index for property only if is not indexed already.
Key to be indexed.
Whether index was created or not.
Returning false
means index was present already.
Create indexes for document keys.
Keys to be indexed.
Removes documents that match the query
.
Emits DocumentNotification with operation DocumentOperation.DELETED which
contains the deleted documents.
Deleted documents.
Clear the Collection by removing all documents.
Emits DocumentNotification with operation DocumentOperation.CLEARED and documents null
.
After dropping, collection becomes non-reactive, and no more DocumentNotification will be emitted.
Therefore it's recommended to not reuse Collection object after this operation.
Remove indexes associated with keys
.
Name of properties, associated indexes of which needs to be removed.
Selects documents in a collection and returns them.
Found documents are post-processed according to options
.
Inserts documents
into Collection.
Documents are validated according to JSON Schema (if given).
When documents originality is DocumentOriginality.CLONE, they will be cloned, prior indexing.
After indexing, DocumentNotification which contains inserted documents is emitted.
Maps Collection documents.
If you need to map only a subset of documents, you can specify an index that needs to be mapped by using options
argument.
Mapping function.
Options which control set of documents that needs to be mapped.
Mapped documents.
Replace documents that match the query
with the replacement
.
Emits 2 DocumentNotification when matches were replaced:
Modifies an existing document or documents.
The method can modify specific fields of an existing document or documents.
When one of the indexed properties is updated, documents will be re-indexed with
the new values of them.
Emits DocumentNotification with operation DocumentOperation.UPDATED which
contains the updated documents.
Watch the collection and receive DocumentNotification when something changes.
Subscribable for subscribing to notifications.
Collection of documents which are kept indexed.