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

Method push_edge

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

Source from the content-addressed store, hash-verified

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