AbstractModelQuery<M, ID> class
abstract
Query for a Model
- Implementers
Constructors
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(
) → Future< int> - return count of this query.
-
delete(
) → Future< int> - return how many rows affected!
-
deletePermanent(
) → Future< int> - return how many rows affected!
-
findBy(
Map< String, dynamic> params, {List<Model> ? existModeList, bool includeSoftDeleted = false}) → Future<List< M> > - find models by params
-
findById(
ID id, {M? existModel, bool includeSoftDeleted = false}) → Future< M?> -
find single model by
id
ifexistModel
is given,existModel
will be filled and returned, otherwise a new model will be returned. -
findByIds(
List idList, {List< Model> ? existModeList, bool includeSoftDeleted = false}) → Future<List< M> > -
find models by
idList
-
findList(
{bool includeSoftDeleted = false}) → Future< List< M> > - find list
-
findListBySql(
String rawSql, [Map< String, dynamic> params = const {}]) → Future<List< M> > - select with raw sql. example: findListBySql(' select distinct(t.*) from table t, another_table t2 where t.column_name=t2.id and t.column_name2=@param1 and t2.column_name3=@param2 order by t.id, limit 10 offset 10 ', {'param1':100,'param2':'hello'})
-
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