pub struct SparqlDiagnostic {
pub query: String,
pub bindings: Vec<(String, Term)>,
pub results: Vec<Vec<(String, Term)>>,
pub fallback_reason: Option<String>,
}Expand description
Debugging detail for one SPARQL-backed constraint evaluation (sh:sparql
or a custom SPARQL-based constraint component), meant to be attached to a
violating report result so a failure is never a dead end: it shows exactly
what query ran, what it was bound to, and what rows it actually returned.
Fields§
§query: StringThe query actually executed, after every static SHACL substitution
($PATH, $currentShape, $shapesGraph, custom-component parameters).
$this is left as a free variable in this text; its per-focus binding
is the first entry of bindings.
bindings: Vec<(String, Term)>Every SHACL prebinding applied before execution, in application order:
$this, then $currentShape/$shapesGraph when present, then any
custom-component parameters (SHACL §6.2.3).
results: Vec<Vec<(String, Term)>>The solution rows the query actually produced (one entry per row, each
a variable-name-to-term list in projection order). For ASK queries
this is always empty — the answer is captured by whether any
ValidationResult/Reason
exists at all, not by a bound row.
fallback_reason: Option<String>Why native lowering did not apply, when known: the first unsupported
construct lower_query hit. None when the query ran natively, or
when it’s a custom constraint component (always opaque today — see
[SparqlExecutor::eval_ask]/[SparqlExecutor::eval_select]).
Trait Implementations§
Source§impl Clone for SparqlDiagnostic
impl Clone for SparqlDiagnostic
Source§fn clone(&self) -> SparqlDiagnostic
fn clone(&self) -> SparqlDiagnostic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SparqlDiagnostic
impl Debug for SparqlDiagnostic
Source§impl<'de> Deserialize<'de> for SparqlDiagnostic
impl<'de> Deserialize<'de> for SparqlDiagnostic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SparqlDiagnostic
Source§impl Hash for SparqlDiagnostic
impl Hash for SparqlDiagnostic
Source§impl PartialEq for SparqlDiagnostic
impl PartialEq for SparqlDiagnostic
Source§impl Serialize for SparqlDiagnostic
impl Serialize for SparqlDiagnostic
impl StructuralPartialEq for SparqlDiagnostic
Auto Trait Implementations§
impl Freeze for SparqlDiagnostic
impl RefUnwindSafe for SparqlDiagnostic
impl Send for SparqlDiagnostic
impl Sync for SparqlDiagnostic
impl Unpin for SparqlDiagnostic
impl UnsafeUnpin for SparqlDiagnostic
impl UnwindSafe for SparqlDiagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.