pub struct ColumnStore { /* private fields */ }Expand description
Per-field typed columns. Homogeneous Int/Float/Bool/Str use a dense vec plus presence bitmap; mixed-type fields and lists spill to a HashMap (slow path).
On-disk (V6) shape is still HashMap<String, HashMap<u32, Value>>.
Implementations§
Source§impl ColumnStore
impl ColumnStore
pub fn new() -> Self
pub fn set(&mut self, node: u32, field: &str, value: Value)
pub fn get(&self, node: u32, field: &str) -> Option<&Value>
Sourcepub fn column(&self, field: &str) -> ColumnHandle<'_>
pub fn column(&self, field: &str) -> ColumnHandle<'_>
Return a pre-resolved column handle for field.
Hashes the field name once so that repeated ColumnHandle::get calls
pay only the inner node-id lookup cost, not the outer string hash.
Returns a handle that always returns None when the field is absent.
pub fn fields(&self) -> impl Iterator<Item = &str>
Sourcepub fn remove(&mut self, node: u32, field: &str) -> Option<Value>
pub fn remove(&mut self, node: u32, field: &str) -> Option<Value>
Remove the value stored at (node, field) and return it, or None if absent.
Prunes the column’s inner map entry when it becomes empty.
Sourcepub fn remove_all(&mut self, node: u32)
pub fn remove_all(&mut self, node: u32)
Drop every field stored for node. Idempotent: a node with no remaining
props (or an id that was never written) is a no-op. Used by DeleteNode
after rule retraction and user-edge sweep. Field iteration order is not
observable — the resulting store is identical regardless of HashMap order.
Trait Implementations§
Source§impl Clone for ColumnStore
impl Clone for ColumnStore
Source§fn clone(&self) -> ColumnStore
fn clone(&self) -> ColumnStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more