sembast 2.1.0
sembast: ^2.1.0 copied to clipboard

outdated

NoSQL persistent embedded file system document-based database for Dart VM and Flutter with encryption support.

example/main.dart

// basically same as the io runner but with extra output
import 'dart:async';

import 'package:path/path.dart';
import 'package:sembast/sembast.dart';
import 'package:sembast/sembast_io.dart';

Future main() async {
  Database db = await databaseFactoryIo
      .openDatabase(join(".dart_tool", "sembast", "example", "record_demo.db"));
  var store = intMapStoreFactory.store("my_store");

  var key = await store.add(db, {"name": "ugly"});
  var record = await store.record(key).getSnapshot(db);
  record =
      (await store.find(db, finder: Finder(filter: Filter.byKey(record.key))))
          .first;
  print(record);
  var records = (await store.find(db,
      finder: Finder(filter: Filter.matches("name", "^ugly"))));
  print(records);
}
541
likes
0
pub points
97%
popularity

Publisher

tekartik.com

NoSQL persistent embedded file system document-based database for Dart VM and Flutter with encryption support.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta, path, synchronized

More

Packages that depend on sembast