sembast 3.7.5+2 copy "sembast: ^3.7.5+2" to clipboard
sembast: ^3.7.5+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);
}
1080
likes
160
pub points
98%
popularity

Publisher

verified publishertekartik.com

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

Repository (GitHub)
View/report issues

Topics

#nosql #database

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

meta, path, synchronized

More

Packages that depend on sembast