Trait SqlTemplate

Source
pub trait SqlTemplate<'q, DB>: Sized
where DB: Database,
{ // Required method fn render_sql(self) -> Result<(String, Option<DB::Arguments<'q>>), Error>; // Provided method fn render_execute_able( self, sql_buffer: &'q mut String, ) -> Result<SqlTemplateExecute<'q, DB>, Error> { ... } }
Expand description

SQL template trait

Defines basic operations for rendering SQL from templates

Required Methods§

Source

fn render_sql(self) -> Result<(String, Option<DB::Arguments<'q>>), Error>

Renders SQL template and returns query string with parameters

Provided Methods§

Source

fn render_execute_able( self, sql_buffer: &'q mut String, ) -> Result<SqlTemplateExecute<'q, DB>, Error>

Renders SQL template and returns executable query result

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§