angel3_orm_postgres 3.2.0 angel3_orm_postgres: ^3.2.0 copied to clipboard
PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions.
import 'dart:io';
import 'package:angel3_orm_postgres/angel3_orm_postgres.dart';
import 'package:postgres_pool/postgres_pool.dart';
void main() async {
var executor = PostgreSqlPoolExecutor(PgPool(
PgEndpoint(
host: 'localhost',
port: 5432,
database: 'orm_test',
username: Platform.environment['POSTGRES_USERNAME'] ?? 'test',
password: Platform.environment['POSTGRES_PASSWORD'] ?? 'test123',
),
settings: PgPoolSettings()
..maxConnectionAge = Duration(hours: 1)
..concurrency = 5,
));
var rows = await executor.query('users', 'SELECT * FROM users', {});
print(rows);
}