BoxerQueryFunctions mixin
Query Functions
- Superclass constraints
- Mixin applications
Properties
- batch ↔ Batch?
-
If batch not null, we will use it for calling the corresponding SQL Api of executor
getter/setter pairinherited
- cloneInstance → BoxerTableBase?
-
no setterinherited
- createTableSpecification → String?
-
Implement createTableSpecification to supply a table structure for conveniently creating table
no setterinherited
- database ↔ Database
-
Database or Transaction instance
getter/setter pairinherited
- executor → DatabaseExecutor
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- queryTranslator ↔ QueryTranslator?
-
Low level translator for query item, called in mQuery method
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableName → String
-
Subclass-Override, supply the table name
no setterinherited
- transaction ↔ Transaction?
-
Database and Transaction implements DatabaseExecutor, Batch's implementation is based on Transaction
Batch contains all SQL interfaces that DatabaseExecutor have, but with void return
getter/setter pairinherited
- writeTranslator ↔ WriteTranslator?
-
Low level translator for inserting/updating item, called in
mInsert&mUpdatemethodgetter/setter pairinherited
Methods
-
clone(
) → BoxerTableBase? -
Usually subclass should implement
clone()method for return a new instance returned byclone()This makes it easy to switch between doTransaction and doBatch operations, and keep the origin instance unchangedinherited -
createTableIfNeeded(
{Database? db, int? version}) → Future< bool?> -
inherited
-
delete(
{String? where, List< Object?> ? whereArgs, BoxerQueryOption? options}) → Future<int> -
Delete
inherited
-
doBatch(
void action(BoxerTableBase clone), {bool? exclusive}) → Future< List< Object?> ?> -
Execute all sql in a batch(essentially transaction). See BoxerTableTranslator.resetWithItems for example usage
inherited
-
doTransaction<
T> (Future< T?> action(BoxerTableBase clone), {bool? exclusive}) → Future<T?> -
Execute all sql in a transaction. See BoxerTableTranslator.resetWithItems for example usage
inherited
-
first<
T> ({BoxerQueryOption? options, ModelTranslatorFromJson< T> ? fromJson}) → Future<T?> -
insert(
Map< String, Object?> values, {ConflictAlgorithm? conflictAlgorithm, bool isReThrow = false}) → Future<int> -
Insert
inherited
-
isTableExisted(
) → Future< bool> -
Check if current table existed
inherited
-
last<
T> ({BoxerQueryOption? options, ModelTranslatorFromJson< T> ? fromJson}) → Future<T?> -
list<
T> ({BoxerQueryOption? options, ModelTranslatorFromJson< T> ? fromJson}) → Future<List< T?> > -
mQuery(
{QueryTranslator? translator, BoxerQueryOption? options}) → Future< List< Object?> > - Query and cast the result to generic object type
-
mQueryAsJson<
T> ({BoxerQueryOption? options}) → Future< List< T> > - translate it to Json-Object (Map or List)
-
mQueryAsList(
{BoxerQueryOption? options}) → Future< List< List> > - translate it to Json List
-
mQueryAsMap(
{BoxerQueryOption? options}) → Future< List< Map> > - translate it to Json Map
-
mQueryAsModels<
T> ({ModelTranslatorFromJson< T> ? fromJson, BoxerQueryOption? options}) → Future<List< T> > -
translate model based on a Json-Object Map,
fromJsonindicate that how-to translate Map to model T object -
mQueryAsNum(
{BoxerQueryOption? options}) → Future< List< num?> > - translate it to num (double or int)
-
mQueryAsStrings(
{BoxerQueryOption? options}) → Future< List< String?> > - translate it to String
-
mQueryTo<
T> ({required QueryTranslator< T> translator, BoxerQueryOption? options}) → Future<List< T> > - Query and translate the values to a specified object models
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onConfigure(
Database db) → Future< void> -
Subclass-Override. When database configured
inherited
-
onCreate(
Database db, int version) → Future< void> -
Subclass-Override. When database create, create table here
inherited
-
onDelete(
BoxerQueryOption options) → void -
inherited
-
onDowngrade(
Database db, int oldVersion, int newVersion) → Future< void> -
Subclass-Override. When database downgrade, update table field here
inherited
-
one<
T> ({BoxerQueryOption? options, ModelTranslatorFromJson< T> ? fromJson}) → Future<T?> -
onInsertValues(
Map< String, Object?> values) → void -
inherited
-
onOpen(
Database db) → Future< void> -
Subclass-Override. When database opened, do some extra logic if you want
inherited
-
onQuery(
BoxerQueryOption options) → void -
inherited
-
onUpdateValues(
Map< String, Object?> values, BoxerQueryOption options) → void -
inherited
-
onUpgrade(
Database db, int oldVersion, int newVersion) → Future< void> -
Subclass-Override. When database upgrade, update table field here
inherited
-
query(
{bool? distinct, List< String> ? columns, String? where, List<Object?> ? whereArgs, String? groupBy, String? having, String? orderBy, int? limit, int? offset, BoxerQueryOption? options}) → Future<List< Map< >String, Object?> > -
Query
inherited
-
resetAutoId(
) → Future< void> -
Reset auto increment ID.
inherited
-
select(
List< String> columns, {String? where, List<Object?> ? whereArgs, bool isUnique = false}) → Future<Object?> -
Select SQL
inherited
-
selectCount(
{String? where, List< Object?> ? whereArgs}) → Future<int?> -
Number of rows in current table, null if result mismatch
inherited
-
selectMax(
String column, {String? where, List< Object?> ? whereArgs}) → Future<Object?> -
Select Max of column value
inherited
-
selectMin(
String column, {String? where, List< Object?> ? whereArgs}) → Future<Object?> -
Select Min of column value
inherited
-
single<
T> ({BoxerQueryOption? options, ModelTranslatorFromJson< T> ? fromJson}) → Future<T> - Attention: single will throw StateError if result-list is not a non-null single element
-
toString(
) → String -
A string representation of this object.
inherited
-
translate2TableMap<
T> (T? item, {WriteTranslator< T> ? translator}) → Map<String, Object?> ? -
inherited
-
update(
Map< String, Object?> values, {String? where, List<Object?> ? whereArgs, ConflictAlgorithm? conflictAlgorithm, BoxerQueryOption? options}) → Future<int> -
Update
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited