dartapi_db 0.0.2 copy "dartapi_db: ^0.0.2" to clipboard
dartapi_db: ^0.0.2 copied to clipboard

A light weight Database helper wrapper for dartapi.

example/dartapi_db_example.dart

import 'package:dartapi_db/dartapi_db.dart';

void main() async {
  final config = DbConfig(
    type: DbType.postgres,
    host: 'localhost',
    port: 5432,
    database: 'dartapi_test',
    username: 'postgres', // or the user you created
    password: 'postgres',
  );
  final db = await DatabaseFactory.create(config);

  await db.insert('users', {'name': 'Akash', 'email': 'akash@example.com'});

  final result = await db.select('users');

  print(result.rows);
}
1
likes
140
points
226
downloads

Publisher

verified publisherakashgk.com

Weekly Downloads

A light weight Database helper wrapper for dartapi.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

mysql_client_plus, postgres

More

Packages that depend on dartapi_db