pub struct LineageGraph {
pub node: LineageNode,
pub sql: Option<String>,
pub dialect: Dialect,
}Expand description
A lineage graph rooted at a specific output column.
Fields§
§node: LineageNodeThe root node representing the target output column.
sql: Option<String>The original SQL that was analyzed.
dialect: DialectThe dialect used for analysis.
Implementations§
Source§impl LineageGraph
impl LineageGraph
Sourcepub fn new(node: LineageNode, dialect: Dialect) -> Self
pub fn new(node: LineageNode, dialect: Dialect) -> Self
Create a new lineage graph.
Sourcepub fn source_tables(&self) -> Vec<String>
pub fn source_tables(&self) -> Vec<String>
Get all source tables in the lineage.
Sourcepub fn source_columns(&self) -> Vec<&LineageNode>
pub fn source_columns(&self) -> Vec<&LineageNode>
Get all source columns (leaf nodes).
Sourcepub fn walk<F>(&self, visitor: &mut F)where
F: FnMut(&LineageNode),
pub fn walk<F>(&self, visitor: &mut F)where
F: FnMut(&LineageNode),
Walk through all nodes in the graph.
Sourcepub fn to_mermaid(&self) -> String
pub fn to_mermaid(&self) -> String
Generate Mermaid diagram visualization.
Trait Implementations§
Source§impl Clone for LineageGraph
impl Clone for LineageGraph
Source§fn clone(&self) -> LineageGraph
fn clone(&self) -> LineageGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LineageGraph
impl RefUnwindSafe for LineageGraph
impl Send for LineageGraph
impl Sync for LineageGraph
impl Unpin for LineageGraph
impl UnsafeUnpin for LineageGraph
impl UnwindSafe for LineageGraph
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