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

Method push_edge

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

Source from the content-addressed store, hash-verified

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

push_str_refFunction · 0.85
pushMethod · 0.80

Tested by 1