MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / insert_row

Method insert_row

nodedb-vector/src/collection/payload_index.rs:274–280  ·  view source on GitHub ↗

Insert all indexed fields from `fields` for `node_id`.

(&mut self, node_id: u32, fields: &HashMap<String, Value>)

Source from the content-addressed store, hash-verified

272
273 /// Insert all indexed fields from `fields` for `node_id`.
274 pub fn insert_row(&mut self, node_id: u32, fields: &HashMap<String, Value>) {
275 for (field, idx) in &mut self.indexes {
276 if let Some(value) = fields.get(field) {
277 idx.insert(node_id, value);
278 }
279 }
280 }
281
282 /// Remove all indexed fields for `node_id`.
283 pub fn delete_row(&mut self, node_id: u32, fields: &HashMap<String, Value>) {

Callers 6

pre_filter_equalityFunction · 0.80
pre_filter_andFunction · 0.80
pre_filter_orFunction · 0.80
snapshot_roundtripFunction · 0.80

Calls 2

getMethod · 0.45
insertMethod · 0.45

Tested by 5

pre_filter_equalityFunction · 0.64
pre_filter_andFunction · 0.64
pre_filter_orFunction · 0.64
snapshot_roundtripFunction · 0.64