sembast_web 2.0.0-nullsafety.0 copy "sembast_web: ^2.0.0-nullsafety.0" to clipboard
sembast_web: ^2.0.0-nullsafety.0 copied to clipboard

outdated

NoSQL persistent embedded database for the Web on top of IndexedDB

example/example.dart

import 'package:sembast_web/sembast_web.dart';
import 'package:sembast/sembast.dart';

Future main() async {
  // Declare our store (records are mapd, ids are ints)
  var store = intMapStoreFactory.store();
  var factory = databaseFactoryWeb;

  // Open the database
  var db = await factory.openDatabase('test');

  // Add a new record
  var key =
      await store.add(db, <String, Object?>{'name': 'Table', 'price': 15});

  // Read the record
  var value = await store.record(key).get(db);

  // Print the value
  print(value);

  // Close the database
  await db.close();
}
55
likes
0
pub points
97%
popularity

Publisher

verified publishertekartik.com

NoSQL persistent embedded database for the Web on top of IndexedDB

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

idb_shim, sembast

More

Packages that depend on sembast_web