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

Method push_node

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

Source from the content-addressed store, hash-verified

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