PostgresAnySqlConnection class final

AnySQL connection backed by a PostgreSQL connection.

Queries with parameters use package:postgres named SQL syntax, such as select * from users where id = @id with parameters: {'id': 1}.

Implemented types
Available extensions

Constructors

PostgresAnySqlConnection(Connection connection)
Wraps an existing PostgreSQL connection.

Properties

connection → Connection
Underlying PostgreSQL connection.
final
hashCode int
The hash code for this object.
no setterinherited
isOpen bool
Whether this connection can still accept queries.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes the underlying database resources.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String statement, {Map<String, Object?> parameters = const {}}) Future<AnySqlResult>
Runs a statement or command and returns a normalized result.
override
store({required AnySqlDialect dialect}) AnySqlStore

Available on AnySqlConnection, provided by the AnySqlStoreConnection extension

Creates an AnySqlStore over this connection.
toString() String
A string representation of this object.
inherited
transaction<T>(Future<T> action(AnySqlTransaction transaction)) Future<T>
Runs work inside a database transaction.
override

Operators

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