BoxerInsertFunctions mixin

Insert 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
insertionsBreakHandler FutureOr<bool> Function()?
handler for caller when reached the maximum capacity or other situation you want to break
getter/setter pair
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 & mUpdate method
getter/setter pairinherited

Methods

clone() BoxerTableBase?
Usually subclass should implement clone() method for return a new instance returned by clone() This makes it easy to switch between doTransaction and doBatch operations, and keep the origin instance unchanged
inherited
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
insert(Map<String, Object?> values, {ConflictAlgorithm? conflictAlgorithm, bool isReThrow = false}) Future<int>
Insert
inherited
isTableExisted() Future<bool>
Check if current table existed
inherited
mInsert<T>(T? item, {WriteTranslator<T>? translator}) Future<int>
mInsertModel<T>(T? model, {ModelTranslatorToJson<T>? toJson, WriteTranslator<T>? translator}) Future<int>
T?, ? is needed
mInsertModels<T>(List<T> models, {ModelTranslatorToJson<T>? toJson, WriteTranslator<T>? translator}) Future<List<int>?>
Insert models
mInserts<T>(List<T> items, {WriteTranslator<T>? translator}) Future<List<int>?>
Inset items
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
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
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