Skip to main content

CeaStoreWriteTx

Trait CeaStoreWriteTx 

Source
pub trait CeaStoreWriteTx {
    // Required methods
    fn has_run(&self, run_hash: &str) -> Result<bool, CeaStoreError>;
    fn upsert_node(
        &self,
        node_id: &str,
        node_kind: &str,
        sig_json: &str,
    ) -> Result<(), CeaStoreError>;
    fn upsert_edge(
        &self,
        edge_id: &str,
        cause_node_id: &str,
        effect_node_id: &str,
        weight_delta: f64,
        version_id: &str,
    ) -> Result<bool, CeaStoreError>;
    fn load_effect_ids_for_cause(
        &self,
        cause_node_id: &str,
        version_id: &str,
    ) -> Result<Vec<String>, CeaStoreError>;
    fn reinforce_negative_edge(
        &self,
        cause_node_id: &str,
        effect_node_id: &str,
        amount: f64,
        version_id: &str,
    ) -> Result<(), CeaStoreError>;
    fn insert_run_log(
        &self,
        run_hash: &str,
        eval_id: &str,
        edges_added: i64,
        edges_updated: i64,
    ) -> Result<(), CeaStoreError>;
}

Required Methods§

Source

fn has_run(&self, run_hash: &str) -> Result<bool, CeaStoreError>

Source

fn upsert_node( &self, node_id: &str, node_kind: &str, sig_json: &str, ) -> Result<(), CeaStoreError>

Source

fn upsert_edge( &self, edge_id: &str, cause_node_id: &str, effect_node_id: &str, weight_delta: f64, version_id: &str, ) -> Result<bool, CeaStoreError>

Persist one positive observation for the edge identified by (cause_node_id, effect_node_id, version_id).

Source

fn load_effect_ids_for_cause( &self, cause_node_id: &str, version_id: &str, ) -> Result<Vec<String>, CeaStoreError>

Return the persisted effect ids previously observed for one (cause_node_id, version_id) pair.

Source

fn reinforce_negative_edge( &self, cause_node_id: &str, effect_node_id: &str, amount: f64, version_id: &str, ) -> Result<(), CeaStoreError>

Persist one negative observation for an existing edge when the cause reappears but the effect is absent in the new run.

Source

fn insert_run_log( &self, run_hash: &str, eval_id: &str, edges_added: i64, edges_updated: i64, ) -> Result<(), CeaStoreError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§