Struct SourceTable
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§
§impl SourceTable
impl SourceTable
pub fn new(tables: Vec<TableRef>, from: TableWithJoins) -> SourceTable
pub fn new(tables: Vec<TableRef>, from: TableWithJoins) -> SourceTable
Creates a new SourceTable with a single FROM item.
Trait Implementations§
§impl Clone for SourceTable
impl Clone for SourceTable
§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 more§impl Debug for SourceTable
impl Debug for SourceTable
§impl From<ExprArg> for SourceTable
impl From<ExprArg> for SourceTable
§fn from(value: ExprArg) -> SourceTable
fn from(value: ExprArg) -> SourceTable
Converts to this type from the input type.
§impl From<SourceTable> for Source
impl From<SourceTable> for Source
§fn from(value: SourceTable) -> Source
fn from(value: SourceTable) -> Source
Converts to this type from the input type.
§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