#[non_exhaustive]pub enum AnalysisError {
Show 29 variants
UndefinedReference {
name: DbString,
span: SourceSpan,
hint: Option<String>,
},
Shadow {
name: DbString,
span: SourceSpan,
prior_span: SourceSpan,
},
PatternKindMismatch {
name: DbString,
prior: PatternElementKind,
current: PatternElementKind,
span: SourceSpan,
prior_span: SourceSpan,
},
AliasReusedAsPatternBinding {
name: DbString,
prior_kind: BindingDeclKind,
new_kind: PatternElementKind,
span: SourceSpan,
},
NotImplemented {
message: String,
span: SourceSpan,
hint: Option<String>,
},
UnboundedRequiresGate {
mode: PathMode,
selector: Option<PathSelector>,
span: SourceSpan,
},
ValueSubqueryShapeViolation {
message: String,
span: SourceSpan,
},
AggregateNestingViolation {
message: String,
span: SourceSpan,
},
GroupedProjectionItemNotGrouped {
span: SourceSpan,
},
ReturnStarRequiresInput {
span: SourceSpan,
},
SortKeyContainsNestedQuery {
span: SourceSpan,
},
SortKeyContainsAggregate {
span: SourceSpan,
},
InvalidReference {
message: String,
span: SourceSpan,
},
RecursionLimitExceeded {
depth: u32,
},
TypeMismatch {
context: TypeMismatchContext,
expected: ExpectedType,
found: GqlType,
span: SourceSpan,
},
ConflictingParameterTypes {
name: DbString,
declarations: Vec<(GqlType, SourceSpan)>,
},
UnknownProcedure {
name: Box<[DbString]>,
span: SourceSpan,
},
WrongArgumentCount {
procedure: Box<[DbString]>,
expected: usize,
minimum: usize,
actual: usize,
span: SourceSpan,
},
UnknownYieldColumn {
procedure: Box<[DbString]>,
column: DbString,
span: SourceSpan,
},
MutatingProcedureInReadPipeline {
procedure: Box<[DbString]>,
mutability: ProcedureMutability,
span: SourceSpan,
},
SchemaUnknownNodeType {
labels: LabelSet,
graph_type: DbString,
span: SourceSpan,
},
SchemaUnknownEdgeType {
label: DbString,
graph_type: DbString,
span: SourceSpan,
},
SchemaEdgeEndpointMismatch {
label: DbString,
expected_source: String,
expected_target: String,
observed_source: Box<LabelSet>,
observed_target: Box<LabelSet>,
span: SourceSpan,
},
SchemaUndeclaredProperty {
property: DbString,
declared_in: DbString,
graph_type: DbString,
span: SourceSpan,
},
SchemaPropertyTypeMismatch {
property: DbString,
declared_in: DbString,
expected: PropertyValueType,
found: GqlType,
span: SourceSpan,
},
SchemaRequiredPropertyMissing {
property: DbString,
declared_in: DbString,
span: SourceSpan,
},
SchemaRequiredPropertyRemoved {
property: DbString,
declared_in: DbString,
span: SourceSpan,
},
SchemaInvalidInsertLabelExpr {
form: InvalidLabelForm,
span: SourceSpan,
},
SchemaRequiredEdgeLabelRemoved {
label: DbString,
declared_in: DbString,
span: SourceSpan,
},
}Expand description
Semantic-analysis failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UndefinedReference
A reference does not resolve to any binding in the enclosing scopes.
Fields
span: SourceSpanSource span of the unresolved reference.
Shadow
A strict declaration site redeclared a binding already present in its scope.
Fields
span: SourceSpanSource span of the redeclaration.
prior_span: SourceSpanSource span of the prior declaration.
PatternKindMismatch
A pattern variable is reused with an element kind incompatible with its prior declaration (e.g. a node variable later used as an edge, or a path binding aliased over an existing node variable).
Fields
prior: PatternElementKindElement kind of the prior declaration.
current: PatternElementKindElement kind of the new occurrence.
span: SourceSpanSource span of the new occurrence.
prior_span: SourceSpanSource span of the prior declaration.
AliasReusedAsPatternBinding
A value alias was reused where GQL requires a graph pattern binding.
Fields
prior_kind: BindingDeclKindPrior non-pattern declaration kind.
new_kind: PatternElementKindNew graph-pattern occurrence kind.
span: SourceSpanSource span of the new occurrence.
NotImplemented
The analyzer encountered an AST surface it does not route yet.
Fields
span: SourceSpanSource span requiring the missing analyzer capability.
UnboundedRequiresGate
ISO 16.4 forbids unbounded quantifiers without a restrictive or selective gate.
Fields
selector: Option<PathSelector>Path selector in scope for the offending pattern.
span: SourceSpanSource span of the unbounded quantifier.
ValueSubqueryShapeViolation
ISO 20.6 scalar value query expression shape violation.
Fields
span: SourceSpanSource span of the invalid VALUE subquery shape.
AggregateNestingViolation
ISO 20.9 forbids aggregate functions directly containing aggregate functions.
Fields
span: SourceSpanSource span of the nested aggregate expression.
GroupedProjectionItemNotGrouped
ISO 14.11 requires every grouped non-aggregate projection item to be one of the grouping keys.
Fields
span: SourceSpanSource span of the invalid projection item.
ReturnStarRequiresInput
ISO 14.11 forbids RETURN * over a unit incoming binding table.
Fields
span: SourceSpanSource span of the invalid RETURN *.
SortKeyContainsNestedQuery
ISO 14.10 forbids nested query specifications inside sort keys.
Fields
span: SourceSpanSource span of the invalid sort key.
SortKeyContainsAggregate
ISO 14.10 restricts aggregate functions in post-RETURN sort keys.
Fields
span: SourceSpanSource span of the invalid sort key.
InvalidReference
A reference is syntactically resolved but not valid in this expression context.
Fields
span: SourceSpanSource span of the invalid reference.
RecursionLimitExceeded
Analyzer expression recursion exceeded the implementation-defined cap.
TypeMismatch
A statically-decidable type mismatch.
Fields
context: TypeMismatchContextOperation or clause that required a different type.
expected: ExpectedTypeExpected type category.
span: SourceSpanSource span of the incompatible expression.
ConflictingParameterTypes
Conflicting inline types were declared for one parameter.
Fields
declarations: Vec<(GqlType, SourceSpan)>Conflicts in encounter order.
UnknownProcedure
Procedure name was not registered.
Fields
span: SourceSpanSource span of the procedure call.
WrongArgumentCount
Procedure argument arity mismatch.
Fields
span: SourceSpanSource span of the procedure call.
UnknownYieldColumn
YIELD col referenced a column not in the procedure output schema.
Fields
span: SourceSpanSource span of the YIELD item.
MutatingProcedureInReadPipeline
A read-only pipeline invoked a procedure declared as graph-writing, schema-writing, or administrative.
Fields
mutability: ProcedureMutabilityDeclared procedure mutability.
span: SourceSpanSource span of the procedure call.
SchemaUnknownNodeType
Static closed-graph validation found no matching node type.
Fields
span: SourceSpanSource span of the offending label expression or pattern.
SchemaUnknownEdgeType
Static closed-graph validation found no matching edge type.
Fields
span: SourceSpanSource span of the offending edge label.
SchemaEdgeEndpointMismatch
Static closed-graph validation found an edge endpoint mismatch.
Fields
observed_source: Box<LabelSet>Observed source label set.
Boxed (together with observed_target) so this variant does not
inflate AnalysisError past clippy’s result_large_err threshold:
LabelSet wraps SmallVec<[DbString; 3]>, so two inline copies
dominated the variant. The Box moves both onto the cold
error-construction path.
observed_target: Box<LabelSet>Observed target label set. Boxed for the same reason as
observed_source.
span: SourceSpanSource span of the offending edge pattern.
SchemaUndeclaredProperty
Static closed-graph validation found an undeclared property.
Fields
span: SourceSpanSource span of the property write.
SchemaPropertyTypeMismatch
Static closed-graph validation found a property value type mismatch.
Fields
expected: PropertyValueTypeExpected runtime storage type.
span: SourceSpanSource span of the offending value expression.
SchemaRequiredPropertyMissing
Static closed-graph validation found a missing required property.
Fields
span: SourceSpanSource span of the insert pattern.
SchemaRequiredPropertyRemoved
Static closed-graph validation found a required property removal.
Fields
span: SourceSpanSource span of the remove item.
SchemaInvalidInsertLabelExpr
Static closed-graph validation found an invalid INSERT label expression.
Fields
form: InvalidLabelFormInvalid label-expression form.
span: SourceSpanSource span of the invalid pattern.
SchemaRequiredEdgeLabelRemoved
Static closed-graph validation found removal of an edge’s required label.
Implementations§
Trait Implementations§
Source§impl Debug for AnalysisError
impl Debug for AnalysisError
Source§impl Diagnostic for AnalysisError
impl Diagnostic for AnalysisError
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codeSource§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic.Source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Diagnostics.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for AnalysisError
impl Display for AnalysisError
Source§impl Error for AnalysisError
impl Error for AnalysisError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AnalysisError
impl RefUnwindSafe for AnalysisError
impl Send for AnalysisError
impl Sync for AnalysisError
impl Unpin for AnalysisError
impl UnsafeUnpin for AnalysisError
impl UnwindSafe for AnalysisError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.