Skip to main content

ToDefault

Trait ToDefault 

Source
pub trait ToDefault<D: Driver> {
    // Required method
    fn to_default(self) -> String;
}
Expand description

Converts a Rust value into a SQL default expression.

Used by table/insert macros when emitting DEFAULT or default expressions.

Required Methods§

Source

fn to_default(self) -> String

Returns a raw SQL string representing the default value for the type.

Implementors§