pub trait ToSQL<'a, V: SQLParam> {
// Required method
fn to_sql(&self) -> SQL<'a, V>;
// Provided method
fn alias(&self, alias: &'static str) -> SQL<'a, V> { ... }
}Expand description
Trait for types that can be converted to SQL fragments.
The 'a lifetime ties any borrowed parameter values to the resulting SQL
fragment, allowing zero-copy SQL construction when inputs are already
borrowed.