raphtory/db/api/storage/graph/storage_ops/
const_props.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use raphtory_api::core::storage::arc_str::ArcStr;

use crate::{db::api::properties::internal::ConstPropertiesOps, prelude::Prop};

use super::GraphStorage;

impl ConstPropertiesOps for GraphStorage {
    fn get_const_prop_id(&self, name: &str) -> Option<usize> {
        self.graph_meta().get_const_prop_id(name)
    }

    fn get_const_prop_name(&self, id: usize) -> ArcStr {
        self.graph_meta().get_const_prop_name(id)
    }

    fn const_prop_ids(&self) -> Box<dyn Iterator<Item = usize> + '_> {
        Box::new(self.graph_meta().const_prop_ids())
    }

    fn get_const_prop(&self, id: usize) -> Option<Prop> {
        self.graph_meta().get_constant(id)
    }

    fn const_prop_keys(&self) -> Box<dyn Iterator<Item = ArcStr> + '_> {
        Box::new(self.graph_meta().constant_names().into_iter())
    }
}