Pillar 4 — Validation (SHACL Core)
pgrdf.validate(data_graph_id BIGINT, shapes_graph_id BIGINT) → JSONB validates the data graph against the shapes graph and returns a W3C sh:ValidationReport-shape JSONB document.
Backed by the shacl 0.3.x crate from the rudof project.
Topics in this pillar
- Mental model.
- Worked example — minCount, datatype, nodeKind constraints.
- SHACL Core components — what's supported.
- Report as data — querying violations with regular SQL.
- 🚀 Forward edge — SHACL-SPARQL — v0.5 custom-constraint surface.
At a glance
sql
SELECT pgrdf.validate(1, 2);
-- → { "conforms": false, "results": [ {...}, {...} ] }