athena_postgres 1.0.10 copy "athena_postgres: ^1.0.10" to clipboard
athena_postgres: ^1.0.10 copied to clipboard

Dart PostgreSQL query builder, expressive and user-friendly API to build and manage SQL queries in your Dart projects.

example/main.dart

import 'package:athena_postgres/athena_postgres.dart';

void main(List<String> args) async {
  final athenaSql = AthenaPostgresql(PostgresDatabaseConfig('host', 1, 'db'));

  await athenaSql.open();

  await athenaSql.create
      .table('users')
      .column((t) => t.string('name'))
      .column((t) => t.string('email'))
      .column((t) => t.int_('age'))
      .run();
  await athenaSql.insert
      .into('users')
      .values({'name': 'juan', 'email': 'juan@example.com'}).run();

  final selected = await athenaSql
      .select(['name', 'email'])
      .from('users')
      .as('u')
      .where((w) => w['u.name'].noEq('@name'))
      .run(mapValues: {'name': 'juan'});
  print(selected);
}
0
likes
0
pub points
0%
popularity

Publisher

verified publisherathena-sql.dev

Dart PostgreSQL query builder, expressive and user-friendly API to build and manage SQL queries in your Dart projects.

Homepage
Repository (GitHub)
View/report issues

Topics

#sql #postgres

License

unknown (license)

Dependencies

athena_sql, path, postgres

More

Packages that depend on athena_postgres