fennec_pg 0.0.1 copy "fennec_pg: ^0.0.1" to clipboard
fennec_pg: ^0.0.1 copied to clipboard

outdated

a dart plugin to connect with postgres included orm.

example/example.dart

import 'package:fennec_pg/fennec_pg.dart';

import 'models/user.dart';
import 'repositories/repository.dart';

void main(List<String> arguments) async {
  var uri = 'postgres://user:password@localhost:5432/db-name';
  await PGConnectionAdapter.init(uri);
  final result = await PGConnectionAdapter.connection
      .query('select * from users')
      .toList();

  for (var row in result) {
    print(row.toMap());
  }
  /* AccountRepository accountRepository = AccountRepository();
  UserRepository userRepository = UserRepository();
  User user = User();
  user.email = '131@web.de';
  user.name = 'ak1';
  user.account = Account();
  User? userResult = await userRepository.insert(user);
  if (userResult != null) {
    print(userResult.toJson());
  }
  final result = await accountRepository.findAll();
  for (var row in result) {
    print(row.toJson());
  }*/
}
5
likes
0
pub points
0%
popularity

Publisher

verified publisherfennecframework.com

a dart plugin to connect with postgres included orm.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto

More

Packages that depend on fennec_pg