Skip to content

๐Ÿš€ Forward edge โ€” SPARQL UPDATE / CONSTRUCT / property paths โ€‹

What's landing next on the SPARQL surface. Tracked in SPEC.pgRDF.LLD.v0.4 ยง4โ€“ยง7 and SPEC.pgRDF.LLD.v0.5-FUTURE.md.

This page is forward-looking. None of the surface described here is callable on the current main cut; everything below is in the in-progress cycle and clearly future-tensed.

SPARQL UPDATE โ€‹

The mutation forms โ€” INSERT DATA, DELETE DATA, INSERT โ€ฆ WHERE โ€ฆ, DELETE โ€ฆ WHERE โ€ฆ, DELETE โ€ฆ INSERT โ€ฆ WHERE โ€ฆ โ€” will be reachable via the same pgrdf.sparql(q) UDF. The q will be inspected for form and dispatched: SELECT/ASK return rows, UPDATE forms run inside the caller's transaction and return a JSONB summary ({"inserted": N, "deleted": M}).

Graph-scoped UPDATE variants โ€” WITH <iri> and inline GRAPH <iri> { โ€ฆ } โ€” will route to the corresponding partition.

See SPEC.pgRDF.LLD.v0.4 ยง4.

CONSTRUCT โ€‹

A sibling UDF pgrdf.construct(q TEXT) โ†’ SETOF JSONB will return graph-shape rows of {subject, predicate, object} โ€” the canonical SPARQL form for graph-snapshot export, view materialisation, and graph-rewrite pipelines.

See SPEC.pgRDF.LLD.v0.4 ยง6.

Property paths โ€‹

The closure-aware path operators will land:

OperatorMeaning
p*Zero or more p hops.
p+One or more p hops.
p?Zero or one p hop.
^pInverse path.
p1|p2Alternation (stretch goal).

These will be closure-aware: where the closure was already materialized into the graph, the translator will pick the materialised view; otherwise it will fall back to recursive SQL.

See SPEC.pgRDF.LLD.v0.4 ยง7.

VALUES, BIND-downstream, aggregates-over-UNION, DESCRIBE โ€‹

Smaller residual SPARQL surface items land alongside the items above as part of the same delivery group. See SPEC.pgRDF.LLD.v0.4 ยง11.

Apache-2.0 licensed. Documentation for pgRDF โ€” built with VitePress, served via GitHub Pages.