d_rocket_engine_web 2.0.0 copy "d_rocket_engine_web: ^2.0.0" to clipboard
d_rocket_engine_web: ^2.0.0 copied to clipboard

Web engine for d_rocket 2.0: IndexedDB-backed DbContext via package:idb_shim. Pure Dart, no WASM, no native binding.

d_rocket_engine_web #

d_rocket_engine_web banner

Web engine for the d_rocket 2.0 framework. Provides a DbContext backed by the browser's IndexedDB via the pure-Dart idb_shim wrapper.

No Rust, no WASM, no native binding — works in any browser that supports IndexedDB (every browser since IE 10 / iOS 8 / Chrome 24).

Install #

dependencies:
  d_rocket: ^2.0.0
  d_rocket_engine_web: ^2.0.0

Quick start #

import 'package:d_rocket/d_rocket.dart';
import 'package:d_rocket_engine_web/d_rocket_engine_web.dart';

void main() async {
  // Register the web engine once at app boot.
  dRocketWeb();
  // Open an IndexedDB-backed database.
  final db = await WebDb.open(name: 'my-app-db');
  // ...
}

Note: WebDb is the web engine's concrete Db implementation, exposed by d_rocket_engine_web. It is API-compatible with Db for the engine-agnostic subset (WebDb.open, WebDb.set<T>(), etc.).

Engines #

d_rocket is engine-agnostic. The runtime core (d_rocket) ships no driver code; you pick one engine per platform:

Engine Backend Platform
d_rocket_engine_sqlite package:sqlite3 iOS, Android, macOS, Linux, Windows
d_rocket_engine_postgres package:postgres Server, native
d_rocket_engine_web IndexedDB (via idb_shim) Web (browser, Flutter web)

Limitations #

  • The package is a thin wrapper around idb_shim. All idb_shim limitations apply (no LIKE / regex on the DB side; no full-text search; transactions are per-tab).
  • Browser-tab isolation: each tab has its own database connection. Cross-tab live queries are NOT supported (use BroadcastChannel or a websocket layer for that).
  • The LIKE operator is implemented in Dart (not in IndexedDB), so where_(o => o.name.like_('%al%')) is slower than a where_(o => o.name == 'alice').

Tests #

74 tests across 7 files. 5 are conditional skips because the in-memory shim doesn't honor openCursor exactly like the browser does; the real browser path is verified by flutter test --platform chrome.

# VM-side (in-memory shim):
dart test

# Browser-side:
flutter test --platform chrome

License #

MIT — see LICENSE. Copyright (c) 2026 Torogoz Tech.

Author #

Abner VelascoArquitecto de Soluciones

LinkedIn

0
likes
140
points
34
downloads

Documentation

Documentation
API reference

Publisher

verified publishertorogoz.tech

Weekly Downloads

Web engine for d_rocket 2.0: IndexedDB-backed DbContext via package:idb_shim. Pure Dart, no WASM, no native binding.

Repository (GitHub)
View/report issues

Topics

#indexeddb #browser #orm #web #database

License

MIT (license)

Dependencies

d_rocket, d_rocket_engine_sqlite, flutter, idb_shim, meta

More

Packages that depend on d_rocket_engine_web