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

Method push_edge

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

Source from the content-addressed store, hash-verified

306 }
307
308 pub fn push_edge(&mut self, r: &EdgeRow) {
309 let buf = &mut self.edges;
310 buf.extend_from_slice(&r.source_idx.to_le_bytes());
311 buf.extend_from_slice(&r.target_idx.to_le_bytes());
312 buf.push(r.kind);
313 buf.push(r.provenance);
314 buf.extend_from_slice(&0u16.to_le_bytes()); // pad
315 buf.extend_from_slice(&r.line.to_le_bytes());
316 buf.extend_from_slice(&r.column.to_le_bytes());
317 push_str_ref(buf, r.metadata_json);
318 push_str_ref(buf, r.source_id_str);
319 push_str_ref(buf, r.target_id_str);
320 self.edge_count += 1;
321 }
322
323 pub fn push_ref(&mut self, r: &RefRow) {
324 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