sqflite_common_ffi 1.1.1

Dart native js
Flutter Android iOS web

sqflite ffi based implementation, for desktop and units tests.

example/main.dart

import 'package:sqflite_common/sqlite_api.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';

Future main() async {
  // Init ffi loader if needed.
  sqfliteFfiInit();

  var databaseFactory = databaseFactoryFfi;
  var db = await databaseFactory.openDatabase(inMemoryDatabasePath);
  await db.execute('''
  CREATE TABLE Product (
      id INTEGER PRIMARY KEY,
      title TEXT
  )
  ''');
  await db.insert('Product', <String, dynamic>{'title': 'Product 1'});
  await db.insert('Product', <String, dynamic>{'title': 'Product 1'});

  var result = await db.query('Product');
  print(result);
  // prints [{id: 1, title: Product 1}, {id: 2, title: Product 1}]
  await db.close();
}
19
likes
110
pub points
95%
popularity

sqflite ffi based implementation, for desktop and units tests.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

alex@tekartik.com

License

MIT (LICENSE)

Dependencies

meta, path, sqflite_common, sqlite3, synchronized

More

Packages that depend on sqflite_common_ffi