sembast 3.8.0-2 copy "sembast: ^3.8.0-2" to clipboard
sembast: ^3.8.0-2 copied to clipboard

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_io.dart';

Future main() async {
  final 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)
      as FutureOr<RecordSnapshot<int, Map<String, Object>>>);
  record =
      (await store.find(db, finder: Finder(filter: Filter.byKey(record.key))))
          .first as RecordSnapshot<int, Map<String, Object>>;
  print(record);
  var records = (await (store.find(db,
          finder: Finder(filter: Filter.matches('name', '^ugly')))
      as FutureOr<List<RecordSnapshot<int, Map<String, Object>>>>));
  print(records);
}
1.08k
likes
0
points
148k
downloads

Publisher

verified publishertekartik.com

Weekly Downloads

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

Homepage
Repository (GitHub)
View/report issues

Topics

#nosql #database

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

meta, path, synchronized

More

Packages that depend on sembast