sembast_sqflite 2.2.0+3 copy "sembast_sqflite: ^2.2.0+3" to clipboard
sembast_sqflite: ^2.2.0+3 copied to clipboard

sembast NoSQL database support on top of sqflite, cross process safe database.

example/main.dart

import 'package:sembast/sembast.dart';
import 'package:sembast_sqflite/sembast_sqflite.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';

Future main() async {
  // The sqflite base factory

  var factory = getDatabaseFactorySqflite(databaseFactoryFfi);

  var db = await factory.openDatabase('example.db');
  // Use the main store for storing key values as String
  var store = StoreRef<String, String>.main();

  // Writing the data
  await store.record('username').put(db, 'my_username');
  await store.record('url').put(db, 'my_url');

  // Reading the data
  var url = await store.record('url').get(db);
  var username = await store.record('username').get(db);

  print('url: $url');
  print('username: $username');
}
27
likes
160
pub points
89%
popularity

Publisher

verified publishertekartik.com

sembast NoSQL database support on top of sqflite, cross process safe database.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

collection, meta, sembast, sqflite_common, synchronized

More

Packages that depend on sembast_sqflite