Skip to main content

SQLSchema

Trait SQLSchema 

Source
pub trait SQLSchema<'a, T, V>: ToSQL<'a, V>
where V: SQLParam + 'a,
{ const NAME: &'static str; const TYPE: T; const SQL: &'static str; }
Expand description

A schema item (table, column, index, view, enum) with a name and its CREATE SQL.

Generated by the schema macros. 'a is the lifetime of borrowed parameter values in the SQL it renders.

Required Associated Constants§

Source

const NAME: &'static str

The item’s SQL name.

Source

const TYPE: T

The kind of item (a dialect-specific enum, or the column’s SQL type name for columns).

Source

const SQL: &'static str

The statement that creates the item (CREATE TABLE ...), or an empty string when it has none.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, S, T, V> SQLSchema<'a, T, V> for &S
where S: SQLSchema<'a, T, V>, V: SQLParam + 'a,

Source§

const NAME: &'static str

Source§

const TYPE: T

Source§

const SQL: &'static str

Implementors§