pub struct JoinGraph { /* private fields */ }Expand description
The join graph representing all relations and join conditions in a query.
Implementations§
Source§impl JoinGraph
impl JoinGraph
Sourcepub fn add_node(&mut self, variable: String, relation: LogicalOperator) -> usize
pub fn add_node(&mut self, variable: String, relation: LogicalOperator) -> usize
Adds a node to the graph.
Sourcepub fn add_edge(
&mut self,
from: usize,
to: usize,
conditions: Vec<JoinCondition>,
)
pub fn add_edge( &mut self, from: usize, to: usize, conditions: Vec<JoinCondition>, )
Adds a join edge between two nodes.
§Panics
Panics if from or to were not previously added via add_node.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of nodes.
Sourcepub fn neighbors(&self, node_id: usize) -> impl Iterator<Item = usize> + '_
pub fn neighbors(&self, node_id: usize) -> impl Iterator<Item = usize> + '_
Returns neighbors of a node.
Sourcepub fn get_conditions(
&self,
left: &BitSet,
right: &BitSet,
) -> Vec<JoinCondition>
pub fn get_conditions( &self, left: &BitSet, right: &BitSet, ) -> Vec<JoinCondition>
Gets the join conditions between two node sets.
Sourcepub fn are_connected(&self, left: &BitSet, right: &BitSet) -> bool
pub fn are_connected(&self, left: &BitSet, right: &BitSet) -> bool
Checks if two node sets are connected by at least one edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JoinGraph
impl RefUnwindSafe for JoinGraph
impl Send for JoinGraph
impl Sync for JoinGraph
impl Unpin for JoinGraph
impl UnwindSafe for JoinGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more