PostgresAdapter class
A DatabaseAdapter implementation for PostgreSQL using the package:postgres Pool.
- Implemented types
Constructors
- PostgresAdapter({required String host, required String database, String? username, String? password, int port = 5432, int maxConnections = 10})
- Creates a PostgresAdapter with the specified connection settings.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Closes the database connection.
override
-
connect(
) → Future< void> -
Establishes a connection to the database.
override
-
dispose(
) → Future< void> -
Performs cleanup operations.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String sql, [Map< String, dynamic> ? params]) → Future<QueryResult> -
Executes a raw
sqlquery within this executor's scope.override -
table(
String name, [DatabaseExecutor? executor]) → QueryBuilder -
Returns a QueryBuilder for the specified
name(table).override -
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
T> (Future< T> callback(DatabaseExecutor tx)) → Future<T> -
Executes multiple queries within a single transaction.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
transformResult(
Result result) → QueryResult -
Transforms a raw database
resultinto a persistent QueryResult.