pub struct LineageNode {
pub name: String,
pub expression: Expression,
pub source: Expression,
pub downstream: Vec<LineageNode>,
pub source_name: String,
pub reference_node_name: String,
}Expand description
A node in the column lineage graph
Fields§
§name: StringName of this lineage step (e.g., “table.column”)
expression: ExpressionThe expression at this node
source: ExpressionThe source expression (the full query context)
downstream: Vec<LineageNode>Downstream nodes that depend on this one
source_name: StringOptional source name (e.g., for derived tables)
reference_node_name: StringOptional reference node name (e.g., for CTEs)
Implementations§
Source§impl LineageNode
impl LineageNode
Sourcepub fn new(
name: impl Into<String>,
expression: Expression,
source: Expression,
) -> Self
pub fn new( name: impl Into<String>, expression: Expression, source: Expression, ) -> Self
Create a new lineage node
Sourcepub fn walk(&self) -> LineageWalker<'_> ⓘ
pub fn walk(&self) -> LineageWalker<'_> ⓘ
Iterate over all nodes in the lineage graph using DFS
Sourcepub fn downstream_names(&self) -> Vec<String>
pub fn downstream_names(&self) -> Vec<String>
Get all downstream column names
Trait Implementations§
Source§impl Clone for LineageNode
impl Clone for LineageNode
Source§fn clone(&self) -> LineageNode
fn clone(&self) -> LineageNode
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 LineageNode
impl RefUnwindSafe for LineageNode
impl Send for LineageNode
impl Sync for LineageNode
impl Unpin for LineageNode
impl UnwindSafe for LineageNode
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