QueryMixin<T extends DatabaseStorable> mixin

A mixin providing methods on creating Queries

Mixin Applications

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

executeQuery(Query query) Future<QueryResult>
Executes the query and returns the result. The method should not throw but rather return a QueryResult.failed
getCreateQuery(T element) Query
generates a query that execute a create operation on the database
getDeleteQuery(T element) Query
generates a query that execute a delete operation on the database
getReadAllQuery({required String entityName}) Query
generates a query that execute a read operation on the database fetching all objects
getReadAllWhereQuery({required String entityName, List<Constraint> where = const [], int? limit}) Query
generates a query that execute a read operation on the database by applying a search function
getReadQuery(String id, {Type? type, required String entityName}) Query
generates a query that execute a read operation on the database for an object with a given id.
getStoreQuery(T element, {bool updateIfExists = false}) Query
generates a create or update query depending if the object should be updated if it exists
getUpdateQuery(T element) Query
generates a query that execute a update operation on the database
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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