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

Method get_variable

graphlite/src/exec/context.rs:134–145  ·  view source on GitHub ↗

Get a variable value, checking session parameters first, then local variables

(&self, name: &str)

Source from the content-addressed store, hash-verified

132
133 /// Get a variable value, checking session parameters first, then local variables
134 pub fn get_variable(&self, name: &str) -> Option<Value> {
135 // First check session parameters
136 if let Some(session_arc) = self.get_session() {
137 if let Ok(user_session) = session_arc.read() {
138 if let Some(value) = user_session.parameters.get(name) {
139 return Some(value.clone());
140 }
141 }
142 }
143 // Check local variables
144 self.variables.get(name).cloned()
145 }
146
147 /// Set a local variable with type information
148 pub fn set_variable(&mut self, name: String, value: Value) {

Callers 8

execute_projectMethod · 0.45
evaluate_expressionMethod · 0.45
execute_ddl_operationMethod · 0.45
validate_schemaMethod · 0.45
execute_ddl_operationMethod · 0.45
execute_ddl_operationMethod · 0.45

Calls 3

cloneMethod · 0.80
get_sessionMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected