EngineDatabaseStorage class Null safety
Main database storage for the engine
- Inheritance
- Object
- DatabaseStorageBase
- DatabaseStorage
- EngineDatabaseStorage
Constructors
Properties
- db ↔ Database
-
The database connection to handle data storage operations
read / write, inherited
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- isReady → bool
-
The current ready status of the database
read-only, inherited
- name → String
-
Name of the database
final, inherited
- path ↔ String
-
The path to the database on disk
read / write, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
schema
→ Map<
String, List< String> > -
The database schema as a map of the table name to the column names
final, inherited
-
tableNames
→ List<
String> -
List of table names currently in database
read-only, inherited
- version → int
-
The current version of the database
final, inherited
Methods
-
addColumn(
String table, String columnName, String dataType) → Future< void> -
Adds a column with
columnName
anddataType
to atable
in the databaseinherited -
addItem(
DatabaseItem item) → Future -
Adds an
item
to the database [...]inherited -
addTable(
String tableName, {DatabaseItem? item}) → Future< void> -
Adds a table to the database
inherited
-
close(
) → Future< void> -
Closes the connection to the database
inherited
-
deleteItem(
String table, String id) → Future< int> -
Deletes an item from the database
table
withid
indicatedinherited -
deleteTable(
String tableName) → dynamic -
Deletes the table with
tableName
from the databaseinherited -
ensureDbOpen(
) → Future< void> -
Ensures that a databse connection is open before using db
inherited
-
getItem(
String table, String id) → Future< Map< String, dynamic> ?> -
Gets an item from the database
table
withid
indicatedinherited -
getItems(
String table) → Future< List< Map< >String, dynamic> > -
Gets all items from the database
table
inherited -
loadTableSchema(
) → Future< void> -
Loads the table schema from the database
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
open(
) → Future< void> -
Opens the connection to the database and saves connection to db
inherited
-
remove(
) → Future< void> -
Removes the database from the disk [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
-
updateItem(
DatabaseItem item) → Future< int> -
Deletes an item from the database
inherited
-
updateTableSchema(
String table, List< String> columns) → dynamic -
Updates the schema
inherited
-
verifySchema(
DatabaseItem item) → dynamic -
Verifies the database schema for the current item
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited