DatabaseManager class

Global registry and lifecycle manager for JustDatabase instances.

Constructors

DatabaseManager()

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

openDatabases Map<String, JustDatabase>
All currently open database instances. Key = lowercase database name.
final

Static Methods

close(String name) Future<void>
Closes and unregisters a database (saves to disk first if persist=true).
closeAll() Future<void>
Closes all open databases.
deleteAll() Future<void>
Closes and deletes all databases including all persisted files.
deleteDatabase(String name) Future<void>
Closes a database and deletes its persisted file.
getOpenDatabase(String name) JustDatabase?
Returns the open database with name, or null if not open.
listDatabases() Future<List<DatabaseInfo>>
Returns DatabaseInfo for all open and all persisted (closed) databases.
open(String name, {DatabaseMode mode = DatabaseMode.standard, bool persist = true}) Future<JustDatabase>
Opens a database and registers it with the manager. If the database is already open, returns the existing instance.