Types for building parameterised SPARQL queries against a quad
store. The flagship type is GraphQueryBuilderSpec —
a record describing what a query does, what kind of result it yields,
and the GraphQueryFunction that constructs the
actual SPARQL string given a graph + scope.
Any SPARQL fragment — e.g. a single statement or a result clause.
Discriminator for the predefined query kinds in
Rdf.SPARQL.QuadStoreQueries.*.
String form of a GraphQueryKind for use as a dict key.
Project a GraphQueryKind to its string key.
A trailing SPARQL clause appended to a query — typically ORDER BY,
LIMIT, or OFFSET.
Type-scope discriminator. Currently only AllTypes is meaningful;
the type exists so future revisions can add OnlyTypes (List IRI) etc.
without breaking call sites.
Filter for scope-based query construction.
OutOfScopeFilter excludes types known to be out-of-scope from results.
The signature shared by every query-builder function.
GraphId — the focus graph the query runs against.Maybe TermId — optional focus resource (for resource-scoped queries).TypeScope — what range of types to consider.Maybe PrefixDictionary — prefix bindings to emit; defaults to the
canonical core prefixes when Nothing.List SPARQLresultConstraint — trailing clauses (e.g. ORDER BY).Returns the rendered SPARQLquery string.
A bundled description of a predefined query: its name, kind, description, default constraints, and the function that builds it.
inScopeTypesFilter and outOfScopeTypesFilter flag whether the
caller should pre-resolve scope-related parameters before building.
formattedSPARQL is an optional cache of the pretty-printed query
for display in editors / health checks — typically populated by a
pass that runs the query through sparqljs.
The pair of a query's kind discriminator and the rendered SPARQL string. Useful as the payload of an "execute this query" message.
A registry of available query builders, keyed by GraphQueryKindKey.
A complete SPARQL query string (PREFIX declarations + body).