DbManager class
数据库管理类
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
-
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
Static Properties
-
appDb
→ Future<
Database> -
获取应用级别数据库实例
no setter
-
loggedInUserIds
→ List<
String> -
获取所有已登录用户的ID列表
no setter
Static Methods
-
closeAppDb(
) → Future< void> - 关闭应用级别数据库
-
closeUserDb(
) → Future< void> - 关闭用户级数据库
-
deleteUserDatabase(
String userId) → Future< void> - 删除用户数据库(完全删除文件)
-
getUserDb(
String userId) → Future< Database> - 获取用户数据库实例
-
hasUserDb(
String userId) → bool - 检查用户数据库是否存在
-
registerAppTable(
String name, String createSql) → void - 注册应用级别数据表 应用初始化时调用
-
registerMigration(
Migration migration) → void - 注册数据库迁移
-
registerUserTable(
String name, String createSql) → void - 注册用户级别数据表 应用初始化时调用
-
userLogin(
String userId) → Future< void> - 用户登录 - 创建/打开用户数据库
-
userLogout(
String userId) → Future< void> - 用户退出 - 关闭用户数据库