Get the graph name for operations using session-aware resolution Returns full path in / / format
(&self)
| 248 | /// Get the graph name for operations using session-aware resolution |
| 249 | /// Returns full path in /<schema-name>/<graph-name> format |
| 250 | pub fn get_graph_name(&self) -> Result<String, crate::exec::error::ExecutionError> { |
| 251 | // Check session current graph |
| 252 | if let Some(graph_name) = self.get_current_graph_name() { |
| 253 | // Validate that the graph name is in full path format |
| 254 | if graph_name.starts_with('/') && graph_name.matches('/').count() >= 2 { |
| 255 | Ok(graph_name) |
| 256 | } else { |
| 257 | Err(crate::exec::error::ExecutionError::RuntimeError( |
| 258 | format!("Session graph name '{}' is not in full path format. Use /<schema-name>/<graph-name> format.", graph_name) |
| 259 | )) |
| 260 | } |
| 261 | } else { |
| 262 | Err(crate::exec::error::ExecutionError::RuntimeError( |
| 263 | "No graph context available. Use SESSION SET GRAPH with full path /<schema-name>/<graph-name> format.".to_string() |
| 264 | )) |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | /// Create a MetadataTracker from this execution context |
| 269 | /// Create ExecutionContext from a simplified Session |
no test coverage detected