Skip to main content

Module strict_sparql

Module strict_sparql 

Source
Expand description

strict-sparql compatibility mode: a process-wide toggle that gates Waratah’s documented SPARQL deviations behind strict 1.1 adherence.

One shared flag, ONE set of consumers per deviation — the deviation table lives with each feature’s rewrite AND its residual evaluator so the indexed and unindexed paths can never disagree in either mode. Read per comparison at EVALUATION time (each strict_sparql() call loads the atomic), so the flag is only safe to set once, at startup, before any query is served — which is the only thing --strict-sparql does. Toggling mid-query would let one query’s indexed and unindexed paths disagree.

Deviations gated today:

  • gYear / gYearMonth ordering comparisons (temporal plugin): SPARQL 1.1’s operator table defines no ordering for the gYear family; non-strict (the default) supports them as a documented extension, strict turns them into type errors.

New deviations MUST be added here as named entries, not scattered booleans.

Functions§

set_strict_sparql
Toggle strict SPARQL mode (CLI / compute config). Affects queries prepared after the call.
strict_sparql
Whether strict SPARQL 1.1 adherence mode is on (default: off).