Resolve a graph expression to an actual graph (helper for internal use)
(
&self,
_graph_expr: Option<&GraphExpression>,
)
| 392 | |
| 393 | /// Resolve a graph expression to an actual graph (helper for internal use) |
| 394 | fn resolve_graph_expression( |
| 395 | &self, |
| 396 | _graph_expr: Option<&GraphExpression>, |
| 397 | ) -> Result<Arc<GraphCache>, ExecutionError> { |
| 398 | // For now, ignore the graph expression and use the first available graph |
| 399 | // This is a quick fix - the proper solution is to use resolve_graph_for_execution |
| 400 | // with proper session context |
| 401 | match self.storage.list_graphs() { |
| 402 | Ok(graph_names) if !graph_names.is_empty() => { |
| 403 | let graph_name = &graph_names[0]; |
| 404 | match self.storage.get_graph(graph_name)? { |
| 405 | Some(graph) => Ok(Arc::new(graph)), |
| 406 | None => Err(ExecutionError::RuntimeError(format!( |
| 407 | "Graph {} not found", |
| 408 | graph_name |
| 409 | ))), |
| 410 | } |
| 411 | } |
| 412 | _ => Err(ExecutionError::RuntimeError( |
| 413 | "No graphs available".to_string(), |
| 414 | )), |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | /// Create a new query executor with provided Storage and Catalog managers |
| 419 | /// This ensures we use singleton instances from SessionManager |
no test coverage detected