database_adapter_sqlite 0.1.0 copy "database_adapter_sqlite: ^0.1.0" to clipboard
database_adapter_sqlite: ^0.1.0 copied to clipboard

discontinued

An adapter for using 'package:database' API with SQLite.

Overview #

Provides an adapter for using the package database with SQLite. The implementation uses the package sqflite.

Getting started #

1.Add dependency #

dependencies:
  database: any
  database_adapter_sqlite: any

2.Configure #

import 'package:database/database.dart';
import 'package:database/sql.dart';
import 'package:database_adapter_sqlite/database_adapter_sqlite.dart';

Future main() async {
  final config = SQLite(
    path: 'path/to/database.db',
  );

  final sqlClient = config.database().sqlClient;

  final result = await database.querySql('SELECT name FROM employee').toRows();
  for (var row in result.rows) {
    print('Name: ${row[0]}');
  }
}
0
likes
30
pub points
0%
popularity

Publisher

verified publisherdint.dev

An adapter for using 'package:database' API with SQLite.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

database, flutter, meta, sqflite

More

Packages that depend on database_adapter_sqlite