FirefuelRepository<T extends Serializable> class
abstract
- Implemented types
-
- Mixed in types
-
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
countAll()
→ Future<Either<Failure, int>>
-
Gets the amount of all documents within the collection.
override
-
countWhere(List<Clause> clauses)
→ Future<Either<Failure, int>>
-
Gets the amount of documents filtered by the provided clauses.
override
-
create(T value)
→ Future<Either<Failure, DocumentId>>
-
Create a new document with an auto-generated DocumentId
override
-
createById({required T value, required DocumentId docId})
→ Future<Either<Failure, DocumentId>>
-
Create a new document with the provided
docId
override
-
delete(DocumentId docId)
→ Future<Either<Failure, void>>
-
Deletes the current document from the collection.
override
-
guard<R>(FutureOr<R> callback())
→ Future<Either<Failure, R>>
-
Protects the provided function from throwing an unhandled exception
inherited
-
guardStream<R>(Stream<R> streamCallback())
→ Stream<Either<Failure, R>>
-
Protects the provided function from throwing an unhandled exception
inherited
-
limit(int limit)
→ Future<Either<Failure, 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<Either<Failure, List<T>>>
-
Get a list of documents from the collection as a list ordered by the
orderBy
override
-
paginate(Chunk<T> chunk)
→ Future<Either<Failure, Chunk<T>>>
-
Get a number of Documents from the Collection specified by the
chunk
override
-
read(DocumentId docId)
→ Future<Either<Failure, T?>>
-
Gets a single document from the collection
override
-
readAll()
→ Future<Either<Failure, List<T>>>
-
Gets all documents from the collection
override
-
readOrCreate({required DocumentId docId, required T createValue})
→ Future<Either<Failure, T>>
-
Get the document by id, or create a new one
override
-
replace({required DocumentId docId, required T value})
→ Future<Either<Failure, void>>
-
Replaces the document at
docId
with value
.
override
-
replaceFields({required DocumentId docId, required T value, required List<String> fieldPaths})
→ Future<Either<Failure, void>>
-
Replaces the fields of the document at
docId
with the matching
fieldPaths
from value
override
-
stream(DocumentId docId)
→ Stream<Either<Failure, T?>>
-
Gets a stream of the document requested
override
-
streamAll()
→ Stream<Either<Failure, List<T>>>
-
Get a list of all documents from the collection as a list
override
-
streamCountAll()
→ Stream<Either<Failure, int>>
-
Gets the amount of all documents from the collection
override
-
streamCountWhere(List<Clause> clauses)
→ Stream<Either<Failure, int>>
-
Gets the amount of documents from the collection, filtered by the provided
clauses
override
-
streamLimited(int limit)
→ Stream<Either<Failure, List<T>>>
-
Get up to the maximum number of documents specified by the
limit
override
-
streamOrdered(List<OrderBy> orderBy)
→ Stream<Either<Failure, 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<Either<Failure, List<T>>>
-
Get a list of documents matching all clauses
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
update({required DocumentId docId, required T value})
→ Future<Either<Failure, void>>
-
Updates data on the document. Data will be merged with any existing
document data.
override
-
updateOrCreate({required DocumentId docId, required T value})
→ Future<Either<Failure, 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<Either<Failure, List<T>>>
-
Get a list of documents matching all clauses
override
-
whereById(DocumentId docId)
→ Future<Either<Failure, T?>>
-
Get a document matching the document id
override