Collection class Core

Exposes the operations which are available to be performed against a collection.

Namely the ability to perform Key-Value operations.

Constructors

Collection({required String name, required Scope scope})

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name of the collection.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

exists(String key, [ExistsOptions? options]) Future<ExistsResult>
Checks whether a document exists or not.
get(String key, [GetOptions? options]) Future<GetResult>
Retrieves the value of a document from the collection.
insert(String key, Object? value, [InsertOptions? options]) Future<MutationResult>
Inserts a new document into the collection, failing if the document already exists.
lookupIn(String key, List<LookupInSpec> specs, [LookupInOptions? options]) Future<LookupInResult>
Performs a Lookup-In operation against a document, fetching individual fields or information about specific fields inside the document value.
mutateIn(String key, List<MutateInSpec> specs, [MutateInOptions? options]) Future<MutateInResult>
Performs a Mutate-In operation against a document.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key, [RemoveOptions? options]) Future<MutationResult>
Remove an existing document from the collection.
replace(String key, Object? value, [ReplaceOptions? options]) Future<MutationResult>
Replaces the value of an existing document.
toString() String
A string representation of this object.
inherited
upsert(String key, Object? value, [UpsertOptions? options]) Future<MutationResult>
Upserts a document into the collection.

Operators

operator ==(Object other) bool
The equality operator.
inherited