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

Method with_entity

graphlite/src/exec/result.rs:255–270  ·  view source on GitHub ↗

Track the source entity for a variable This enables identity-based comparison in set operations

(&mut self, var_name: &str, value: &Value)

Source from the content-addressed store, hash-verified

253 /// Track the source entity for a variable
254 /// This enables identity-based comparison in set operations
255 pub fn with_entity(&mut self, var_name: &str, value: &Value) {
256 match value {
257 Value::Node(node) => {
258 self.source_entities
259 .insert(var_name.to_string(), EntityId::Node(node.id.clone()));
260 }
261 Value::Edge(edge) => {
262 self.source_entities
263 .insert(var_name.to_string(), EntityId::Edge(edge.id.clone()));
264 }
265 _ => {
266 // Properties and computed values don't have entity IDs
267 // We might track their source entity in the future
268 }
269 }
270 }
271
272 /// Get the primary entity ID for this row (if any)
273 /// Used for simple identity comparisons

Calls 4

cloneMethod · 0.80
NodeClass · 0.50
EdgeClass · 0.50
insertMethod · 0.45

Tested by

no test coverage detected