pub trait SQLTableInfo:
Any
+ Send
+ Sync {
// Required methods
fn name(&self) -> &str;
fn columns(&self) -> &'static [&'static dyn SQLColumnInfo];
fn dependencies(&self) -> &'static [&'static dyn SQLTableInfo];
// Provided methods
fn schema(&self) -> Option<&str> { ... }
fn qualified_name(&self) -> Cow<'static, str> { ... }
fn column_named(&self, name: &str) -> Option<&'static dyn SQLColumnInfo> { ... }
}Required Methods§
fn columns(&self) -> &'static [&'static dyn SQLColumnInfo]
fn dependencies(&self) -> &'static [&'static dyn SQLTableInfo]
Provided Methods§
Sourcefn qualified_name(&self) -> Cow<'static, str>
fn qualified_name(&self) -> Cow<'static, str>
Fully-qualified table name when schema is present.
Sourcefn column_named(&self, name: &str) -> Option<&'static dyn SQLColumnInfo>
fn column_named(&self, name: &str) -> Option<&'static dyn SQLColumnInfo>
Lookup a column by name.
Trait Implementations§
Source§impl Debug for dyn SQLTableInfo
impl Debug for dyn SQLTableInfo
Source§impl<'a, V: SQLParam> From<&'static dyn SQLTableInfo> for SQLChunk<'a, V>
impl<'a, V: SQLParam> From<&'static dyn SQLTableInfo> for SQLChunk<'a, V>
Source§fn from(value: &'static dyn SQLTableInfo) -> Self
fn from(value: &'static dyn SQLTableInfo) -> Self
Converts to this type from the input type.
Source§impl<'a, V: SQLParam + 'a> ToSQL<'a, V> for &'static dyn SQLTableInfo
impl<'a, V: SQLParam + 'a> ToSQL<'a, V> for &'static dyn SQLTableInfo
fn to_sql(&self) -> SQL<'a, V>
Source§fn into_sql(self) -> SQL<'a, V>where
Self: Sized,
fn into_sql(self) -> SQL<'a, V>where
Self: Sized,
Consume self and return SQL without cloning.
Default delegates to
to_sql() (which clones). Types that own their SQL
(like SQL and SQLExpr) override this to avoid the clone.