GenericRepository<T> class
Generic repository implementation
- Inheritance
-
- Object
- Repository<
T> - GenericRepository
Constructors
-
GenericRepository(QueryDatabase db, String _tableName, Map<
String, dynamic> _toJson(T), T _fromJson(Map<String, dynamic> ))
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
-
count(
) → int -
Count all records
override
-
delete(
dynamic id) → void -
Delete a record
override
-
findAll(
) → List< T> -
Find all records
override
-
findById(
dynamic id) → T? -
Find a record by ID
override
-
insert(
T record) → T -
Insert a record
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
T record) → T -
Update a record
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited