DriftSQLDatabaseServer class

SQLDatabaseServer implementation that wraps drift's GeneratedDatabase

Constructors

DriftSQLDatabaseServer({required String id, required String name, required GeneratedDatabase database, String? icon, void tableSorter(List<SQLTableDefinition>)? = _defaultTableSorter})

Properties

dateTimeFormat Future<DateTimeFormat>
The format in which datetime items are reported
final
hashCode int
The hash code for this object.
no setterinherited
icon String?
The icon to use for this server. Must be an svg or a base64 encoded png (square, preferably 16x16 or 32x32)
final
id String
Unique id for this session
final
name String
The name of this server, eg: the name of the preference file
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Future<String>
The full schema of the database
final
schemaVersion Future<int?>
If available, the schema version of the database
no setter
tables Future<List<SQLTableDefinition>>
The tables contained in this database
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String query, List<ValueWithType> variables) Future<QueryResult>
Query the database using the provided query and return the result variables are used to provide safe way to bind variables to the query statement
toString() String
A string representation of this object.
inherited
update(String query, {required List<String> affectedTables, required List<ValueWithType> variables}) Future<int>
Update the database using the provided query and return the number of affected rows if known. variables are used to provide safe way to bind variables to the query statement. affectedTables is a hint describing which tables are affected by this update, can be used to notify table listeners

Operators

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