BoxerDatabase class

Constructors

BoxerDatabase({required int version, String? path, String? name})

Properties

database Database
no setter
hashCode int
The hash code for this object.
no setterinherited
name String?
Database file's name
getter/setter pair
namedTables Map<String, BoxerTableBase>
Register tables for this instance of database
getter/setter pair
openingCompleter Completer<Database?>?
Create and Open Database instance Set _database and openingCompleter to null if u want to re-open database
getter/setter pair
path String?
Database file's path
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tables List<BoxerTableBase>
no setter
version int
Database version IMPORTANT!!! Changing it will affect the database opening phase's callback functions
final

Methods

close() Future<void>
Close database, release connection resource
delete() Future<void>
Delete database
dropTable(String tableName) Future<bool>
Drop table
ensureDatabaseAvailable() FutureOr<Database>
getColumnNames(String tableName) Future<List<String>>
Get table (except sqlite_master) column names
getTable<T extends BoxerTableBase>(String name) → T?
isTableExisted(String tableName) Future<bool>
Check if current table created success using "sqlite_master"
iterateAllTables(FutureOr<bool?> iterator(String tableName, List<String> columns)) Future<void>
Iterate all the tables
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ofTable<T extends BoxerTableBase>() → T?
open() FutureOr<Database?>
openDB({required String path, int? version}) Future<Database>
registerTable(BoxerTableBase table, {String? name}) → void
resetAutoId(String tableName) Future<void>
Reset auto increment ID
selectCount(String tableName, {String? where, List<Object?>? whereArgs}) Future<int?>
Select count
setDatabase(Database db) → void
toString() String
A string representation of this object.
inherited

Operators

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