sembast_web 2.4.0+4 copy "sembast_web: ^2.4.0+4" to clipboard
sembast_web: ^2.4.0+4 copied to clipboard

NoSQL persistent embedded database for the Web on top of IndexedDB

example/example.dart

import 'package:sembast_web/sembast_web.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
160
points
81.7k
downloads

Publisher

verified publishertekartik.com

Weekly Downloads

NoSQL persistent embedded database for the Web on top of IndexedDB

Repository (GitHub)
View/report issues

Topics

#nosql #database

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

idb_shim, sembast, synchronized, web

More

Packages that depend on sembast_web