Repository<T extends Serializable> class
abstract
- Implemented types
-
- CollectionCount<Either<Failure, int>>
- CollectionRead<Either<Failure, List<T>>, T>
- CollectionPaginate<Either<Failure, Chunk<T>>, T>
- DocCreate<Either<Failure, DocumentId>, T>
- DocCreateIfNotExist<Either<Failure, T>, T>
- DocDelete<Either<Failure, void>>
- DocRead<Either<Failure, T?>>
- DocReplace<Either<Failure, void>, T>
- DocUpdate<Either<Failure, void>, T>
- Implementers
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.
inherited
-
countWhere(List<Clause> clauses)
→ Future<Either<Failure, int>>
-
Gets the amount of documents filtered by the provided clauses.
inherited
-
create(T value)
→ Future<Either<Failure, DocumentId>>
-
Create a new document with an auto-generated DocumentId
inherited
-
createById({required T value, required DocumentId docId})
→ Future<Either<Failure, DocumentId>>
-
Create a new document with the provided
docId
inherited
-
delete(DocumentId docId)
→ Future<Either<Failure, void>>
-
Deletes the current document from the collection.
inherited
-
limit(int limit)
→ Future<Either<Failure, List<T>>>
-
Get up to the maximum number of documents specified by the limit
inherited
-
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
inherited
-
paginate(Chunk<T> chunk)
→ Future<Either<Failure, Chunk<T>>>
-
Get a number of Documents from the Collection specified by the
chunk
inherited
-
read(DocumentId docId)
→ Future<Either<Failure, T?>>
-
Gets a single document from the collection
inherited
-
readAll()
→ Future<Either<Failure, List<T>>>
-
Gets all documents from the collection
inherited
-
readOrCreate({required DocumentId docId, required T createValue})
→ Future<Either<Failure, T>>
-
Get the document by id, or create a new one
inherited
-
replace({required DocumentId docId, required T value})
→ Future<Either<Failure, void>>
-
Replaces the document at
docId
with value
.
inherited
-
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
inherited
-
stream(DocumentId docId)
→ Stream<Either<Failure, T?>>
-
Gets a stream of the document requested
inherited
-
streamAll()
→ Stream<Either<Failure, List<T>>>
-
Get a list of all documents from the collection as a list
inherited
-
streamCountAll()
→ Stream<Either<Failure, int>>
-
Gets the amount of all documents from the collection
inherited
-
streamCountWhere(List<Clause> clauses)
→ Stream<Either<Failure, int>>
-
Gets the amount of documents from the collection, filtered by the provided
clauses
inherited
-
streamLimited(int limit)
→ Stream<Either<Failure, List<T>>>
-
Get up to the maximum number of documents specified by the
limit
inherited
-
streamOrdered(List<OrderBy> orderBy)
→ Stream<Either<Failure, List<T>>>
-
Get a list of all documents from the collection sorted by
orderBy
inherited
-
streamWhere(List<Clause> clauses, {List<OrderBy>? orderBy, int? limit})
→ Stream<Either<Failure, List<T>>>
-
Get a list of documents matching all clauses
inherited
-
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.
inherited
-
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.
inherited
-
where(List<Clause> clauses, {List<OrderBy>? orderBy, int? limit})
→ Future<Either<Failure, List<T>>>
-
Get a list of documents matching all clauses
inherited
-
whereById(DocumentId docId)
→ Future<Either<Failure, T?>?>
-
Get a document matching the document id
inherited