sembast 3.8.0+1 copy "sembast: ^3.8.0+1" to clipboard
sembast: ^3.8.0+1 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.09k
likes
160
points
137k
downloads

Publisher

verified publishertekartik.com

Weekly Downloads

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

Repository (GitHub)
View/report issues

Topics

#nosql #database

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

meta, path, synchronized

More

Packages that depend on sembast