Skip to content

Dataset references, part 2: whole-ledger FROM, streaming on the view lane, and the remaining readers of dataset text #2079

Open
0 of 2 issues completed

Description

@aaj3f

#2007 gives dataset and graph references one grammar and one resolver, and it's deliberately part 1 of two: it changes how references parse and resolve, not which execution lane serves a shape. Part 2 is lane consolidation, plus retiring the string readers of dataset text that are still around. Each of those reads a dataset its own way, and where one disagrees with the parser, the query runs on one reading while the server prepares for another. This is part 2's checklist; #1975 and #1996 are the two existing issues it covers.

Lanes:

Readers of dataset text:

  • The advisory header. x-fdb-warning is still computed by route-level walkers: needs_default_graph_injection and jsonld_dataset_semantics_warning_headers read only the top-level from / fromNamed / from-named, and the SPARQL twin doesn't look inside EXISTS. So the header can differ from QueryResult::advisories, which reads the lowered query. Render the header, and the MCP envelope, from advisories.
  • Refresh and min-t collection (refreshable_ledger_id, refreshable_ledger_id_and_t, collect_refreshable_jsonld_ledgers, collect_jsonld_min_t_requirements, and collect_sparql_min_t_requirements with iri_to_string, all in the server's routes/query.rs) skip any text that starts with urn: or contains ://, read JSON-LD from / fromNamed at the top level only (not opts, not ledger), and don't expand a SPARQL prefixed name. A ledger named any of those ways isn't refreshed before the query, and its @t: pin sets no min-t requirement. (The multi-query route already reads its members from validation.)
  • pin_jsonld_dataset (a pinned ledger path) walks every dataset key, top level and opts alike, where the parser reads one of each pair.
  • MCP's load_address renders a parsed address back to text for the loader to parse again. It round-trips and no divergence is known, so this is just passing the parsed address through.
  • Once those are gone, one dataset parse per /query request, which was the design's goal.
  • ledger_info() and ledger_cached() parse with LedgerRef::parse. Today they use LedgerId::parse, so a urn:fluree: id is refused there ("branch cannot contain ':'").

Config:

Related existing issues: #1975, #1996 (attached here as sub-issues).

From #2007 (Not in this PR: lane consolidation; Deviations from the design), #2008 (Follow-ups: f:ledger) and #2009 (Follow-ups: query-side urn:default).

Sub-issues

Sub-issues

0 of 2 Issues completed
Loading 2 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:queryenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions