DatabaseConnection class abstract

Abstract database connection interface Supports PostgreSQL, MySQL, and SQLite

Implementers

Constructors

DatabaseConnection()

Properties

databaseType DatabaseType
Get database type
no setter
hashCode int
The hash code for this object.
no setterinherited
isOpen bool
Check if connection is open
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

beginTransaction() Future<DatabaseTransaction>
Begin a transaction
close() Future<void>
Close the connection
execute(String sql, {Map<String, dynamic>? parameters}) Future<int>
Execute a non-query statement (INSERT, UPDATE, DELETE)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String sql, {Map<String, dynamic>? parameters}) Future<List<Map<String, dynamic>>>
Execute a query and return mapped results
rawQuery(String sql, {Map<String, dynamic>? parameters}) Future<List<List>>
Execute a query and return raw results
toString() String
A string representation of this object.
inherited

Operators

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