toasty_core/stmt/
table_with_joins.rs

1use super::{Join, TableFactor};
2
3/// A `FROM` item: a table reference paired with zero or more joins.
4///
5/// Represents one entry in the `FROM` clause of a `SELECT` statement at the
6/// table level.
7///
8/// # Examples
9///
10/// ```ignore
11/// use toasty_core::stmt::{TableWithJoins, TableFactor, SourceTableId};
12///
13/// let twj = TableWithJoins {
14///     relation: TableFactor::Table(SourceTableId(0)),
15///     joins: vec![],
16/// };
17/// ```
18#[derive(Debug, Clone, PartialEq)]
19pub struct TableWithJoins {
20    /// The base table or derived table.
21    pub relation: TableFactor,
22
23    /// Joins applied to the base relation.
24    pub joins: Vec<Join>,
25}