You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adopt session.from-entries for the filtered-query path (wire-free BQL after first query per filter) #249
rustledger's stateful session (rustledger#1421, from this repo's #173 design) has zero adopters here: our query endpoint runs against filtered entries (g.filtered.entries_with_all_prices), and until now a session could only be built from source or a file path. So every BQL query ships the full filtered directive list over the wire (builder.query-entries) and re-converts it — per query.
rustledger#1755 adds session.from-entries(list<directive>) -> session (WIT 3.4.0): pay the marshaling once per directive set, then query runs against directives held inside the component.
Proposed adoption
RustledgerComponentEngine gains open_session_entries(entries_json) calling [static]session.from-entries (same pattern as the existing open_session/open_session_file).
RLConnection caches one ComponentSession keyed on the identity of the entries sequence it was constructed with (fava constructs a connection per request but the filtered entries object is cached by fava's g.filtered layer — verify the identity survives across requests for an unchanged filter; if not, key on (ledger mtime, filter string)).
execute() uses session.query(query_string) when a cached session matches; falls back to query_entries otherwise (and always for engines without 3.4.0 — probe once via the WIT version in util.types or hasattr).
Invalidate the cache on ledger reload (load_file) and filter change.
Notes from the contract
Conversion-failing directives are dropped (mirrors query-entries); survivor count observable via info().entries.
Held entries carry no ledger options — keep consulting load-time info() for options.
Requires a rustledger release carrying WIT 3.4.0 (component pin bump).
Activity
feat: adopt session.from-entries for the query path (#249)
chore: bump rustledger to v0.21.0 (#252)
feat: adopt session.from-entries for the query path (#249)
feat: adopt session.from-entries for the query path (#249) (#253)