stem_sqlite 0.1.0-alpha.3 copy "stem_sqlite: ^0.1.0-alpha.3" to clipboard
stem_sqlite: ^0.1.0-alpha.3 copied to clipboard

SQLite broker and result backend for Stem.

stem_sqlite #

pub package Dart License Buy Me A Coffee

SQLite broker and result backend implementations for the Stem runtime. Use it to embed Stem into single-node or desktop deployments without external infrastructure.

Install #

dart pub add stem_sqlite

Add the core runtime if you haven't already:

dart pub add stem

Usage #

import 'package:stem/stem.dart';
import 'package:stem_sqlite/stem_sqlite.dart';

Future<void> main() async {
  final registry = SimpleTaskRegistry()
    ..register(FunctionTaskHandler(name: 'demo.sqlite', handler: print));

  final broker = await SqliteBroker.open(
    SqliteConnection.inMemory(), // or SqliteConnection.file('stem.db')
  );
  final backend = await SqliteResultBackend.open(
    SqliteConnection.inMemory(),
  );

  final stem = Stem(broker: broker, backend: backend, registry: registry);
  await stem.enqueue('demo.sqlite', args: {'name': 'Stem'});
}

Tests #

The package bundles compliance tests from stem_adapter_tests. Running

dart test

executes the shared broker and backend contract suites against the SQLite adapters.

Support #

Report issues or feature requests on the GitHub tracker. Commercial support is available via Buy Me A Coffee.

0
likes
0
points
260
downloads

Publisher

unverified uploader

Weekly Downloads

SQLite broker and result backend for Stem.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, drift, meta, path, sqlite3, stem

More

Packages that depend on stem_sqlite