angel3_orm_postgres 8.1.0 copy "angel3_orm_postgres: ^8.1.0" to clipboard
angel3_orm_postgres: ^8.1.0 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
140
pub points
58%
popularity

Publisher

verified publisherdukefirehawk.com

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