Skip to main content

NamedTable

Trait NamedTable 

Source
pub trait NamedTable
where Self: Table,
{ // Required methods fn schema(&self) -> Option<&str>; fn table(&self) -> &str; }
Expand description

A helper trait to access the name of a table and the optionally the name of the schema the table belongs to

Usually you would like to use the QueryFragment implementation for the table type instead to correctly construct the relevant SQL fragment including correctly quoting all involved names

Required Methods§

Source

fn schema(&self) -> Option<&str>

The schema name

Source

fn table(&self) -> &str

The table name

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> NamedTable for T
where T: Table + StaticQueryFragment, T::Component: NamedTableHelper,