angel3_orm_postgres 8.2.2 copy "angel3_orm_postgres: ^8.2.2" to clipboard
angel3_orm_postgres: ^8.2.2 copied to clipboard

PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions.

example/main.dart

import 'dart:io';
import 'package:angel3_orm_postgres/angel3_orm_postgres.dart';
import 'package:postgres/postgres.dart';

void main() async {
  var executor = PostgreSqlPoolExecutor(Pool.withEndpoints([
    Endpoint(
      host: Platform.environment['POSTGRES_HOSTNAME'] ?? 'localhost',
      port: 5432,
      database: Platform.environment['POSTGRES_DB'] ?? 'orm_test',
      username: Platform.environment['POSTGRES_USERNAME'] ?? 'test',
      password: Platform.environment['POSTGRES_PASSWORD'] ?? 'test123',
    )
  ],
      settings: PoolSettings(
          maxConnectionAge: Duration(hours: 1), maxConnectionCount: 5)));

  var rows = await executor.query('users', 'SELECT * FROM users', {});
  print(rows);
}
4
likes
160
points
148
downloads

Publisher

verified publisherdukefirehawk.com

Weekly Downloads

PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

angel3_orm, logging, pool, postgres

More

Packages that depend on angel3_orm_postgres