Check if a basic query returns any results with early termination
(
&self,
query: &BasicQuery,
outer_context: &ExecutionContext,
)
| 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( |
no test coverage detected