sekejap 0.19.4
sekejap: ^0.19.4 copied to clipboard
Embedded graph-first multi-model database (SQL + graph + vector + spatial). dart:ffi bindings over the sekejap C ABI, for Dart and Flutter.
Changelog #
0.17.0 #
The wrapper is now dart:ffi over the sekejap C ABI. It is a rewrite, not
an upgrade: every call has a new spelling.
Changed #
- The binding.
flutter_rust_bridgeover a Rust glue crate is gone; the package bindslibsekejap(dist/ffi, contractdocs/dist/C_ABI.md) directly withdart:ffi. All 59 C functions are exposed, one Dart call each. - Pure Dart. The package no longer depends on Flutter and is no longer a
Flutter plugin. It works unchanged in a Dart CLI, a server and a Flutter app.
Its one dependency is
package:ffi. - A row is a collection and a key, not one slug string:
db.put('dish', 'd1', {…}),db.get('dish', 'd1'). - Handles are classes.
Db,Statement,Scan,Transaction, each freed by its ownclose()and all of them before theDbthey borrow. - Errors are exceptions. A failure throws
SekejapExceptioncarrying both channels of the ABI: the closedSekejapStatusand the messagesekejap_last_errorwrote on this thread. A miss staysnull.
Removed #
flutter_rust_bridgeand the generatedlib/src/rust/bindings, and therust/glue crate (sekejap_ffi) they were generated from. The C ABI is the binding now, and the header is generated fromdist/ffi/src/lib.rs.- cargokit and the
android/,ios/,linux/,macos/,windows/plugin folders. They existed to build the glue crate from source on a consumer's machine; there is no glue crate to build. Ship the platform'slibsekejapwith the app instead — see the README. dbNew(an in-memory database). sekejap is disk-first and has no in-memory store;Db.openMemory()keeps the name and refuses with the reason.- The typed model layer —
@SekejapEntity,Collection,Query,Filter,Sekejap.open(schema:)— and thesekejap_generatorpackage that generated it. It was a second front end over the old Rust glue's API and does not describe the 0.17 surface. The wrapper mirrors the C functions one to one; a typed layer over these calls is separate work. dbSetWalSyncand the mobile profile call. Store configuration is set at open, once:Db.openWithConfig(path, StoreConfig(sync: SyncMode.normal)).watchChanges. The change feed has a service behind it now:Db.openService,subscribe,nextChange,unsubscribe.
Added #
- Service mode:
Db.openService,subscribe/nextChange/unsubscribe,statementTimeoutMs,cancel,clearInterrupt. - Transactions:
db.transaction()withput,delete,link,execute,commit,rollback. - Paged walks:
db.scan(collection)anddb.stream(sql, params, pageRows). - The catalog:
createCollection,dropCollection,collections,describe,countRows,scanCountRows,scanCountEdges. checkpoint,publish,storage,explain.