MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / validate_expressions

Function validate_expressions

graphlite/src/ast/validator.rs:1050–1088  ·  view source on GitHub ↗

Validate expressions (function calls, property access, etc.)

(
    query: &Query,
    ctx: &mut ValidationContext,
    errors: &mut Vec<ValidationError>,
)

Source from the content-addressed store, hash-verified

1048
1049/// Validate expressions (function calls, property access, etc.)
1050fn validate_expressions(
1051 query: &Query,
1052 ctx: &mut ValidationContext,
1053 errors: &mut Vec<ValidationError>,
1054) {
1055 match query {
1056 Query::Basic(basic_query) => {
1057 validate_basic_query_expressions(basic_query, ctx, errors);
1058 }
1059 Query::SetOperation(set_op) => {
1060 validate_expressions(&set_op.left, ctx, errors);
1061 validate_expressions(&set_op.right, ctx, errors);
1062 }
1063 Query::Limited { query, .. } => {
1064 validate_expressions(query, ctx, errors);
1065 }
1066 Query::WithQuery(_) => {
1067 // TODO: Implement WithQuery validation
1068 }
1069 Query::Let(_) => {
1070 // TODO: Implement LET validation
1071 }
1072 Query::For(_) => {
1073 // TODO: Implement FOR validation
1074 }
1075 Query::Filter(_) => {
1076 // TODO: Implement FILTER validation
1077 }
1078 Query::Return(_) => {
1079 // TODO: Implement RETURN validation
1080 }
1081 Query::Unwind(_) => {
1082 // TODO: Implement UNWIND validation
1083 }
1084 Query::MutationPipeline(_) => {
1085 // TODO: Validate mutation pipeline expressions
1086 }
1087 }
1088}
1089
1090fn validate_basic_query_expressions(
1091 query: &BasicQuery,

Callers 2

validate_queryFunction · 0.85
validate_subqueryFunction · 0.85

Calls 1

Tested by

no test coverage detected