FirefuelCollection<T extends Serializable> class
abstract
Methods
-
countAll()
→ Future<int>
-
Gets the amount of all documents within the collection.
override
-
countWhere(List<Clause> clauses)
→ Future<int>
-
Gets the amount of documents filtered by the provided clauses.
override
-
create(T value)
→ Future<DocumentId>
-
Create a new document with an auto-generated DocumentId
override
-
createById({required T value, required DocumentId docId})
→ Future<DocumentId>
-
Create a new document with the provided
docId
override
-
delete(DocumentId docId)
→ Future<void>
-
Deletes the current document from the collection.
override
-
fromFirestore(DocumentSnapshot<Map<String, dynamic>> snapshot, SnapshotOptions? options)
→ T?
-
Converts a DocumentSnapshot to a
T?
-
generateDocId()
→ DocumentId
-
Auto-generate a DocumentId
-
limit(int limit)
→ Future<List<T>>
-
Get up to the maximum number of documents specified by the limit
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(List<OrderBy> orderBy, {int? limit})
→ Future<List<T>>
-
Get a list of documents from the collection as a list ordered by the
orderBy
override
-
paginate(Chunk<T> chunk)
→ Future<Chunk<T>>
-
Get a number of Documents from the Collection specified by the
chunk
override
-
read(DocumentId docId)
→ Future<T?>
-
Gets a single document from the collection
override
-
readAll()
→ Future<List<T>>
-
Gets all documents from the collection
override
-
readOrCreate({required DocumentId docId, required T createValue})
→ Future<T>
-
Get the document by id, or create a new one
override
-
replace({required DocumentId docId, required T value})
→ Future<void>
-
Replaces the document at
docId
with value
.
override
-
replaceFields({required DocumentId docId, required T value, required List<String> fieldPaths})
→ Future<void>
-
Replaces the fields of the document at
docId
with the matching
fieldPaths
from value
override
-
stream(DocumentId docId)
→ Stream<T?>
-
Gets a stream of the document requested
override
-
streamAll()
→ Stream<List<T>>
-
Get a list of all documents from the collection as a list
override
-
streamCountAll()
→ Stream<int>
-
Gets the amount of all documents from the collection
override
-
streamCountWhere(List<Clause> clauses)
→ Stream<int>
-
Gets the amount of documents from the collection, filtered by the provided
clauses
override
-
streamLimited(int limit)
→ Stream<List<T>>
-
Get up to the maximum number of documents specified by the
limit
override
-
streamOrdered(List<OrderBy> orderBy)
→ Stream<List<T>>
-
Get a list of all documents from the collection sorted by
orderBy
override
-
streamWhere(List<Clause> clauses, {List<OrderBy>? orderBy, int? limit})
→ Stream<List<T>>
-
Get a list of documents matching all clauses
override
-
toFirestore(T? model, SetOptions? options)
→ Map<String, Object?>
-
Converts a
T?
to a Map<String, Object?> to upload to Firestore.
-
toString()
→ String
-
A string representation of this object.
inherited
-
update({required DocumentId docId, required T value})
→ Future<void>
-
Updates data on the document. Data will be merged with any existing
document data.
override
-
updateOrCreate({required DocumentId docId, required T value})
→ Future<T>
-
Updates data on the document if it exists. Data will be merged with
any existing document data.
override
-
where(List<Clause> clauses, {List<OrderBy>? orderBy, int? limit})
→ Future<List<T>>
-
Get a list of documents matching all clauses
override
-
whereById(DocumentId docId)
→ Future<T?>
-
Get a document matching the document id
override