A Collection with a primarily asynchronous API.
- Inheritance
-
- Object
- Collection
- AsyncCollection
Constructors
Properties
-
count
→ Future<
int> -
The total number of documents in this collection.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indexes
→ Future<
List< String> > -
The names of all existing indexes for this collection.
no setteroverride
- name → String
-
The name of this collection.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → AsyncScope
-
The Scope this collection belongs to.
no setteroverride
Methods
-
addChangeListener(
CollectionChangeListener listener) → Future< ListenerToken> -
Adds a
listener
to be notified of all changes to Documents in this collection.override -
addDocumentChangeListener(
String id, DocumentChangeListener listener) → Future< ListenerToken> -
Adds a
listener
to be notified of changes to the Document with the givenid
.override -
changes(
) → AsyncListenStream< CollectionChange> -
Returns a Stream to be notified of all changes to Documents in this
collection.
override
-
createIndex(
String name, Index index) → Future< void> -
Creates a value or full-text search
index
with the givenname
for the documents in this collection.override -
deleteDocument(
Document document, [ConcurrencyControl concurrencyControl = ConcurrencyControl.lastWriteWins]) → Future< bool> -
Deletes a
document
from this collection, resolving conflicts through ConcurrencyControl.override -
deleteIndex(
String name) → Future< void> -
Deletes the Index of the given
name
.override -
document(
String id) → Future< Document?> -
Returns the
Document
with the givenid
, if it exists.override -
documentChanges(
String id) → AsyncListenStream< DocumentChange> -
Returns a Stream to be notified of changes to the Document with the
given
id
.override -
getDocumentExpiration(
String id) → Future< DateTime?> -
Gets the expiration date of a Document by its
id
, if it exists.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
purgeDocument(
Document document) → Future< void> -
Purges a
document
from this collection.override -
purgeDocumentById(
String id) → Future< void> -
Purges a Document from this collection by its
id
.override -
removeChangeListener(
ListenerToken token) → Future< void> -
Removes a previously added change listener.
override
-
saveDocument(
MutableDocument document, [ConcurrencyControl concurrencyControl = ConcurrencyControl.lastWriteWins]) → Future< bool> -
Saves a
document
to this collection, resolving conflicts through ConcurrencyControl.override -
saveDocumentWithConflictHandler(
MutableDocument document, SaveConflictHandler conflictHandler) → Future< bool> -
Saves a
document
to this collection, resolving conflicts with aconflictHandler
.override -
setDocumentExpiration(
String id, DateTime? expiration) → Future< void> -
Sets an
expiration
date for a Document by itsid
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String id) → Future< DocumentFragment> -
Returns the
DocumentFragment
for the Document with the givenid
.override