CommonDatabase class abstract

An opened sqlite3 database.

Constructors

CommonDatabase()

Properties

autocommit bool
Checks whether the connection is in autocommit mode. The connection is in autocommit by default, except when inside a transaction.
no setter
config DatabaseConfig
Configuration for the database connection.
no setter
hashCode int
The hash code for this object.
no setterinherited
lastInsertRowId int
The row id of the most recent successful insert statement on this database connection.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedRows int
The amount of rows inserted, updated or deleted by the last INSERT, UPDATE or DELETE statement, respectively.
no setter
updates Stream<SqliteUpdate>
An async stream of data changes happening on this database.
no setter
userVersion int
The application defined version of this database.
getter/setter pair

Methods

createAggregateFunction<V>({required String functionName, required AggregateFunction<V> function, AllowedArgumentCount argumentCount = const AllowedArgumentCount.any(), bool deterministic = false, bool directOnly = true}) → void
Creates an application-defined aggregate function that can be used from sql queries sent against this database.
createCollation({required String name, required CollatingFunction function}) → void
Creates a collation that can be used from sql queries sent against this database.
createFunction({required String functionName, required ScalarFunction function, AllowedArgumentCount argumentCount = const AllowedArgumentCount.any(), bool deterministic = false, bool directOnly = true}) → void
Creates a scalar function that can be called from sql queries sent against this database.
dispose() → void
Closes this database and releases associated resources.
execute(String sql, [List<Object?> parameters = const []]) → void
Executes the sql statement with the provided parameters, ignoring any rows returned by the statement.
getUpdatedRows() int
The amount of rows affected by the last INSERT, UPDATE or DELETE statement.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare(String sql, {bool persistent = false, bool vtab = true, bool checkNoTail = false}) CommonPreparedStatement
Compiles the sql statement to execute it later.
prepareMultiple(String sql, {bool persistent = false, bool vtab = true}) List<CommonPreparedStatement>
Compiles multiple statements from sql to be executed later.
select(String sql, [List<Object?> parameters = const []]) ResultSet
Prepares the sql statement and runs it with the provided parameters, returning all rows returned by the statement.
toString() String
A string representation of this object.
inherited

Operators

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