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

Method push_node

codegraph-kernel/src/buffers.rs:273–295  ·  view source on GitHub ↗
(&mut self, r: &NodeRow)

Source from the content-addressed store, hash-verified

271
272impl Tables {
273 pub fn push_node(&mut self, r: &NodeRow) -> u32 {
274 let buf = &mut self.nodes;
275 buf.push(r.kind);
276 buf.push(r.visibility);
277 buf.extend_from_slice(&r.flags.0.to_le_bytes());
278 buf.extend_from_slice(&r.start_line.to_le_bytes());
279 buf.extend_from_slice(&r.end_line.to_le_bytes());
280 buf.extend_from_slice(&r.start_column.to_le_bytes());
281 buf.extend_from_slice(&r.end_column.to_le_bytes());
282 push_str_ref(buf, r.name);
283 push_str_ref(buf, r.qualified_name);
284 push_str_ref(buf, r.id);
285 push_str_ref(buf, r.docstring);
286 push_str_ref(buf, r.signature);
287 push_str_ref(buf, r.decorators);
288 push_str_ref(buf, r.type_parameters);
289 push_str_ref(buf, r.return_type);
290 push_str_ref(buf, r.extra_json);
291 buf.extend_from_slice(&0u32.to_le_bytes()); // metrics slot (Arc 3.2)
292 let idx = self.node_count;
293 self.node_count += 1;
294 idx
295 }
296
297 pub fn push_edge(&mut self, r: &EdgeRow) {
298 let buf = &mut self.edges;

Callers 15

extractFunction · 0.80
create_nodeMethod · 0.80
extractFunction · 0.80
create_nodeMethod · 0.80
extractFunction · 0.80
create_nodeMethod · 0.80
extractFunction · 0.80
create_nodeMethod · 0.80
extractFunction · 0.80
create_nodeMethod · 0.80
extractFunction · 0.80
create_nodeMethod · 0.80

Calls 1

push_str_refFunction · 0.85

Tested by 1