Repository class abstract

Base data repository. Can perform the basic CRUD operations.

Implementers

Constructors

Repository()

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

clear({String? userId}) Future<void>
Deletes all the entries of the repository. If userId is not null, the only enties that will be deleted will have the same user id.
count({String? userId, Where? where}) Future<int>
Returns the number of entries in the repository.
create({String? wantedId}) Future<Model>
Creates a new entry in the repository.
delete(Model item) Future<void>
Deletes an entry in the repository.
deleteWhere(Where where) Future<void>
Deletes all the entries that are compliant to the where clause.
get(String id) Future<Model>
Returns the entry with the specified id.
getAll({String? userId, Where? where, String? orderBy, bool descending = true}) Future<List<Model>>
Returns all the entries in the repository. If userId is not null, the results will have the same user id. If where is not null, the results will be compliant to the where clause.
initialize() Future<void>
Initialize the repository.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(Model item) Future<void>
Updates an entry in the repository.

Operators

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