v2.11.0
·
248 commits
to main
since this release
Minor Changes
-
#134
e2de396Thanks @flyon! - Addexec(target?: IDataset)to the four query builders (SelectBuilder,CreateBuilder,UpdateBuilder,DeleteBuilder) for targeted query execution against an explicit dataset.// Run against one specific store/router instead of the global default; the global router is untouched. await Person.select((p) => p.name).exec(someStore); await NodeShape.create(data).withId(iri).exec(branchStore);
- Passing a
target(a store, or a router — a router is anIDataset) runs the query on that dataset only. Omitting it is unchanged (global dispatch), andawaiting a builder (the PromiseLike path) always stays global — only an explicit.exec(target)overrides. selectQueryis required onIDataset; the mutation methods are optional, so a mutationexec(target)rejects with a clear message if the target can't perform the op. Allexecmethods are nowasync, so failures (unsupported target, missing global dispatch) surface as rejected promises rather than synchronous throws.
syncShape(target, ds?)andsyncShapes(ds?)now accept an optional dataset that threads through to every.exec(ds). ForsyncShapes,dsis a plan-time parameter feeding both the orphan-detection read and the delete/create thunks, so orphans are computed against the same store they're pruned from; the returned thunks stay nullary.const { store } = await getBranchMetadataStore(projectId, branch); await syncShape(Person, store)(); // materialize Person's sh:NodeShape into a per-branch store
No routing/config/
LinkedStoragechanges — purely an execution-target override on the builder. Seedocs/reports/021-targeted-query-execution.md. - Passing a