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

Method check_basic_query_exists

graphlite/src/exec/executor.rs:1086–1097  ·  view source on GitHub ↗

Check if a basic query returns any results with early termination

(
        &self,
        query: &BasicQuery,
        outer_context: &ExecutionContext,
    )

Source from the content-addressed store, hash-verified

1084
1085 /// Check if a basic query returns any results with early termination
1086 fn check_basic_query_exists(
1087 &self,
1088 query: &BasicQuery,
1089 outer_context: &ExecutionContext,
1090 ) -> Result<bool, ExecutionError> {
1091 // For now, use the regular execution but optimize by checking for early termination
1092 // TODO: In the future, this could be optimized further with direct pattern matching
1093 let result = self.execute_basic_query_with_context(query, outer_context)?;
1094
1095 // Return true if we found any results
1096 Ok(!result.rows.is_empty())
1097 }
1098
1099 /// Execute a subquery with correlated variable support
1100 fn execute_subquery_with_context(

Callers 1

check_subquery_existsMethod · 0.80

Calls 2

is_emptyMethod · 0.45

Tested by

no test coverage detected