MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / push_edge

Method push_edge

codegraph-kernel/src/buffers.rs:298–311  ·  view source on GitHub ↗
(&mut self, r: &EdgeRow)

Source from the content-addressed store, hash-verified

296 }
297
298 pub fn push_edge(&mut self, r: &EdgeRow) {
299 let buf = &mut self.edges;
300 buf.extend_from_slice(&r.source_idx.to_le_bytes());
301 buf.extend_from_slice(&r.target_idx.to_le_bytes());
302 buf.push(r.kind);
303 buf.push(r.provenance);
304 buf.extend_from_slice(&0u16.to_le_bytes()); // pad
305 buf.extend_from_slice(&r.line.to_le_bytes());
306 buf.extend_from_slice(&r.column.to_le_bytes());
307 push_str_ref(buf, r.metadata_json);
308 push_str_ref(buf, r.source_id_str);
309 push_str_ref(buf, r.target_id_str);
310 self.edge_count += 1;
311 }
312
313 pub fn push_ref(&mut self, r: &RefRow) {
314 self.push_ref_flagged(r, 0);

Callers 15

create_nodeMethod · 0.80
extract_methodMethod · 0.80
flush_value_refsMethod · 0.80
create_nodeMethod · 0.80
create_nodeMethod · 0.80
flush_value_refsMethod · 0.80
create_nodeMethod · 0.80
flush_value_refsMethod · 0.80
create_nodeMethod · 0.80
flush_value_refsMethod · 0.80
create_nodeMethod · 0.80
extract_methodMethod · 0.80

Calls 1

push_str_refFunction · 0.85

Tested by 1