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

Method get_graph_name

graphlite/src/exec/context.rs:250–266  ·  view source on GitHub ↗

Get the graph name for operations using session-aware resolution Returns full path in / / format

(&self)

Source from the content-addressed store, hash-verified

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

Callers 15

operation_descriptionMethod · 0.80
operation_descriptionMethod · 0.80
execute_ddl_operationMethod · 0.80
operation_descriptionMethod · 0.80
operation_descriptionMethod · 0.80
execute_modificationMethod · 0.80
execute_modificationMethod · 0.80
operation_descriptionMethod · 0.80
execute_modificationMethod · 0.80
operation_descriptionMethod · 0.80
execute_modificationMethod · 0.80

Calls 1

Tested by

no test coverage detected