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

Method route_and_execute

graphlite/src/exec/executor.rs:304–331  ·  view source on GitHub ↗

Route and execute based on statement type

(
        &self,
        request: &ExecutionRequest,
        context: &mut ExecutionContext,
        graph: Option<&Arc<GraphCache>>,
    )

Source from the content-addressed store, hash-verified

302
303 /// Route and execute based on statement type
304 fn route_and_execute(
305 &self,
306 request: &ExecutionRequest,
307 context: &mut ExecutionContext,
308 graph: Option<&Arc<GraphCache>>,
309 ) -> Result<QueryResult, ExecutionError> {
310 // Use existing execution infrastructure with context
311 match &request.statement {
312 Statement::Query(_query) if request.physical_plan.is_some() => {
313 // If we have a pre-computed physical plan, use it
314 let plan = request.physical_plan.as_ref().unwrap();
315 if let Some(graph) = graph {
316 self.execute_physical_plan_with_context(plan, context, graph)
317 } else {
318 self.execute_physical_plan_without_graph(plan, context)
319 }
320 }
321 _ => {
322 // Execute statement directly within the route_and_execute flow
323 self.execute_statement(
324 &request.statement,
325 context,
326 request.graph_expr.as_ref(),
327 request.session.as_ref(),
328 )
329 }
330 }
331 }
332
333 /// Execute physical plan with context and graph
334 fn execute_physical_plan_with_context(

Callers 1

execute_queryMethod · 0.80

Calls 4

unwrapMethod · 0.80
execute_statementMethod · 0.80

Tested by

no test coverage detected