database_adapter_sqlite 0.1.0

Flutter Android iOS

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]}');
  }
}
1
likes
80
pub points
59%
popularity

Publisher

dint.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

database, flutter, meta, sqflite

More

Packages that depend on database_adapter_sqlite