pub struct SourceTable {
pub tables: Vec<TableRef>,
pub from: Vec<TableWithJoins>,
}Expand description
A lowered table-level data source for a SELECT statement.
Contains a list of table references (which may be schema tables, CTEs, or
derived tables) and the FROM items that reference them by index
(SourceTableId).
§Examples
ⓘ
use toasty_core::stmt::{SourceTable, TableRef, TableWithJoins, TableFactor, SourceTableId};
use toasty_core::schema::db::TableId;
let source = SourceTable::new(
vec![TableRef::Table(TableId(0))],
TableWithJoins {
relation: TableFactor::Table(SourceTableId(0)),
joins: vec![],
},
);Fields§
§tables: Vec<TableRef>All table references used in this source. Indexed by SourceTableId.
from: Vec<TableWithJoins>The FROM items, each being a table with optional joins.
Implementations§
Source§impl SourceTable
impl SourceTable
Sourcepub fn new(tables: Vec<TableRef>, from: TableWithJoins) -> Self
pub fn new(tables: Vec<TableRef>, from: TableWithJoins) -> Self
Creates a new SourceTable with a single FROM item.
Trait Implementations§
Source§impl Clone for SourceTable
impl Clone for SourceTable
Source§fn clone(&self) -> SourceTable
fn clone(&self) -> SourceTable
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 moreSource§impl Debug for SourceTable
impl Debug for SourceTable
Source§impl From<ExprArg> for SourceTable
impl From<ExprArg> for SourceTable
Source§impl From<SourceTable> for Source
impl From<SourceTable> for Source
Source§fn from(value: SourceTable) -> Self
fn from(value: SourceTable) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SourceTable
impl PartialEq for SourceTable
impl StructuralPartialEq for SourceTable
Auto Trait Implementations§
impl Freeze for SourceTable
impl RefUnwindSafe for SourceTable
impl Send for SourceTable
impl Sync for SourceTable
impl Unpin for SourceTable
impl UnwindSafe for SourceTable
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