pub struct CatalogTable { /* private fields */ }Expand description
One table registered in a Catalog: a (catalog?, schema?, name)
identity plus its column names.
name is mandatory; schema and catalog are optional — a bare
table (e.g. from unqualified DDL) has neither, and engines without a
catalog layer omit the catalog. An omitted segment matches any query
value there (right-anchored, the same wildcard rule a query reference
gets for its own omitted qualifiers), so a schema-less users matches
both a bare users and a qualified public.users. Identifiers are
stored verbatim; a present segment compares exactly (folding only
under case-insensitive dialects — see the module docs). columns may
be empty when the table is known but its columns aren’t.
Implementations§
Source§impl CatalogTable
impl CatalogTable
Sourcepub fn new(schema: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(schema: impl Into<String>, name: impl Into<String>) -> Self
A table identified by schema.name, with no columns yet and no
catalog segment. Add columns with Self::columns and a
catalog with Self::catalog.
Sourcepub fn unqualified(name: impl Into<String>) -> Self
pub fn unqualified(name: impl Into<String>) -> Self
A table with no schema (e.g. from unqualified DDL). The omitted
schema is a wildcard, so it matches a query by name alone — bare
users and qualified public.users both match. Add columns with
Self::columns.
Sourcepub fn catalog(self, catalog: impl Into<String>) -> Self
pub fn catalog(self, catalog: impl Into<String>) -> Self
Set the catalog segment (for engines with a catalog layer).
Trait Implementations§
Source§impl Clone for CatalogTable
impl Clone for CatalogTable
Source§fn clone(&self) -> CatalogTable
fn clone(&self) -> CatalogTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CatalogTable
impl Debug for CatalogTable
Source§impl Display for CatalogTable
impl Display for CatalogTable
impl Eq for CatalogTable
Source§impl FromIterator<CatalogTable> for Catalog
impl FromIterator<CatalogTable> for Catalog
Source§fn from_iter<I: IntoIterator<Item = CatalogTable>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = CatalogTable>>(iter: I) -> Self
Source§impl PartialEq for CatalogTable
impl PartialEq for CatalogTable
Source§fn eq(&self, other: &CatalogTable) -> bool
fn eq(&self, other: &CatalogTable) -> bool
self and other values to be equal, and is used by ==.