DatabaseWrapper class
The DatabaseWrapper class is responsible for managing the connection
to the SQLite database. It handles database initialization, ensuring the
database is ready for use, and provides helper functions for interacting
with specific tables.
Constructors
- DatabaseWrapper()
-
Constructor for
DatabaseWrapper.
Properties
- database ↔ Database
-
Holds a reference to the opened database.
getter/setter pair
- dbIsReady ↔ bool
-
Tracks whether the database is ready for use.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ensureDBIsInitialized(
) → Future< void> - Ensures the database is initialized and ready for use.
-
getNextID(
{required TablesWithAutoIncrement table, int? userID}) → Future< int> - Retrieves the next available ID for auto-incrementing tables.
-
getUserRepo(
) → UserDatabaseRepo -
Provides an instance of
UserDatabaseRepo. -
init(
) → Future< void> - Initializes the SQLite database asynchronously.
-
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