aim_postgres library
PostgreSQL database driver for the Aim ORM framework.
This library provides PostgreSQL-specific implementations of the Aim ORM abstractions. It includes support for:
- SSL/TLS connections with multiple security modes
- Cleartext and MD5 password authentication
- Simple and Extended Query protocols
- Parameter binding and prepared statements
Usage
import 'package:aim_postgres/aim_postgres.dart';
final db = await PostgresDatabase.connect(
'postgresql://user:pass@localhost:5432/mydb',
);
final results = await db.query('SELECT * FROM users WHERE id = $1', args: [1]);
await db.close();
For SSL/TLS connections:
final db = await PostgresDatabase.connect(
'postgresql://user:pass@localhost:5432/mydb?sslmode=require',
);
Classes
- PostgresConnection
- Low-level PostgreSQL connection implementation.
- PostgresDatabase
- PostgreSQL database implementation.
- PostgresQueryable
- PostgresTransaction
- QueryResult
- Result of a query execution.
Enums
- PostgresAuthenticationType
- PostgreSQL authentication types.
- PostgresMessageType
- PostgreSQL wire protocol message types.
- PostgresSslMode
- PostgreSQL SSL connection modes.
Extensions
- PostgresConnectionAuthenticator on PostgresConnection
- Authentication support for PostgreSQL.
- PostgresConnectionExtendedQuery on PostgresConnection
- Extended Query Protocol implementation.
- PostgresConnectionMessageParser on PostgresConnection
- Message parsing utilities for PostgreSQL wire protocol.
- PostgresConnectionSimpleQuery on PostgresConnection
- Simple Query Protocol implementation.
- PostgresConnectionSsl on PostgresConnection
- SSL/TLS connection support for PostgreSQL.
Exceptions / Errors
- QueryException
- Exception thrown when a query execution fails.