pub struct ScopedTable {
pub table: TableMetadata,
pub start_index: usize,
pub scope_level: usize,
pub hidden_unqualified_columns: HashSet<String>,
pub merged_column_partners: HashMap<String, usize>,
}Expand description
A table visible to expression name resolution.
Fields§
§table: TableMetadata§start_index: usize§scope_level: usizeLexical nesting level; zero is the current SELECT and larger values are successively enclosing SELECT scopes.
Columns coalesced by a JOIN … USING or NATURAL JOIN. They remain addressable by a qualified right-hand reference, but are not candidates for an unqualified reference because the merged output column owns the name.
merged_column_partners: HashMap<String, usize>For a column merged by USING or NATURAL, the output index of the other
side. An unqualified reference to a merged name resolves to
COALESCE(left, right) so that RIGHT and FULL joins report the key from
whichever side is present instead of the left side’s NULL.
Implementations§
Source§impl ScopedTable
impl ScopedTable
pub fn new(table: TableMetadata, start_index: usize) -> Self
pub fn hide_unqualified_columns(&mut self, columns: &[String])
Sourcepub fn merge_column_with(&mut self, column: &str, partner_index: usize)
pub fn merge_column_with(&mut self, column: &str, partner_index: usize)
Record that column is merged with the output column at partner_index.
Trait Implementations§
Source§impl Clone for ScopedTable
impl Clone for ScopedTable
Source§fn clone(&self) -> ScopedTable
fn clone(&self) -> ScopedTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScopedTable
impl RefUnwindSafe for ScopedTable
impl Send for ScopedTable
impl Sync for ScopedTable
impl Unpin for ScopedTable
impl UnsafeUnpin for ScopedTable
impl UnwindSafe for ScopedTable
Blanket Implementations§
impl<T> Allocation for T
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