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
refactor: introduce Queryable trait to replace explicit dataset-mode checks in context.rs #1304
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingtriage:needs-decisionBlocked on a product/design decision
probably not for this pr, but explicit checks for dataset mode (or any other "queryable" type) suggests that we could benefit from a trait here.
File:fluree-db-query/src/context.rs around line 747
Problem
Methods like single_db_user_graph_id, single_db_user_graph_iris, and similar arms in QueryContext guard behavior with explicit self.dataset.is_some() checks. This is a structural code smell: the "queryable type" (single-ledger vs. dataset/multi-ledger) should be expressed as a trait, not as runtime conditionals on Option<Dataset>.
Proposed Direction
Introduce a Queryable (or similar) trait that abstracts over single-ledger and dataset query contexts. Methods that currently branch on dataset.is_some() would instead dispatch polymorphically.
Scope
Likely a moderate-to-large refactor touching fluree-db-query and potentially call sites in fluree-db-api. Should be done as a standalone PR after the LSM novelty work lands.
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingtriage:needs-decisionBlocked on a product/design decision
Activity