Skip to main content

GraphExecutor

Trait GraphExecutor 

Source
pub trait GraphExecutor: Send + Sync {
    // Required methods
    fn bfs(
        &self,
        start: NodeId,
        edge_types: Option<&[EdgeType]>,
        direction: Direction,
        min_depth: u32,
        max_depth: u32,
        snapshot: SnapshotId,
    ) -> Result<TraversalResult>;
    fn neighbors(
        &self,
        node: NodeId,
        edge_types: Option<&[EdgeType]>,
        direction: Direction,
        snapshot: SnapshotId,
    ) -> Result<Vec<(NodeId, EdgeType, HashMap<String, Value>)>>;
    fn insert_edge(
        &self,
        tx: TxId,
        source: NodeId,
        target: NodeId,
        edge_type: EdgeType,
        properties: HashMap<String, Value>,
    ) -> Result<bool>;
    fn delete_edge(
        &self,
        tx: TxId,
        source: NodeId,
        target: NodeId,
        edge_type: &str,
    ) -> Result<()>;
}

Required Methods§

Source

fn bfs( &self, start: NodeId, edge_types: Option<&[EdgeType]>, direction: Direction, min_depth: u32, max_depth: u32, snapshot: SnapshotId, ) -> Result<TraversalResult>

Source

fn neighbors( &self, node: NodeId, edge_types: Option<&[EdgeType]>, direction: Direction, snapshot: SnapshotId, ) -> Result<Vec<(NodeId, EdgeType, HashMap<String, Value>)>>

Source

fn insert_edge( &self, tx: TxId, source: NodeId, target: NodeId, edge_type: EdgeType, properties: HashMap<String, Value>, ) -> Result<bool>

Source

fn delete_edge( &self, tx: TxId, source: NodeId, target: NodeId, edge_type: &str, ) -> Result<()>

Implementors§