BaseDbManager class abstract

Constructors

BaseDbManager()

Properties

db → Database
no setter
hashCode int
The hash code for this object.
no setterinherited
isCreateFinish bool
getter/setter pair
newVersion int
getter/setter pair
oldVersion int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearTable(String tableName) Future<void>
删除所有数据
drop(String tableName) Future<void>
删除数据表的功能
getDbName() String
数据库名称,可复写
getDbVersion() int
数据库的版本号,可复写
init([String? dbName]) Future<void>
项目进行初始化
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreate(Database db, int version) FutureOr<void>
onCreate the database
onOpen(Database db) FutureOr<void>
on open the database
onUpgrade(Database db, int oldVersion, int newVersion) FutureOr<void>
版本号变更,调用onCreate,创建未创建的table
queryCount(String tableName) Future<int>
查询该表的数据数
queryTableInfo(String name) Future<TableInfo?>
查询表信息
queryTables() Future<List<String>>
查询数据库中所有的表
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance BaseDbManager
no setter

Static Methods

initial(BaseDbManager manager) → dynamic