IntoStatement

Trait IntoStatement 

Source
pub trait IntoStatement: Sealed {
    // Required methods
    fn needs_parse(&self) -> bool;
    fn as_sql(&self) -> Option<&str>;
    fn as_prepared(&self) -> Option<&PreparedStatement>;
}
Expand description

Sealed trait for types that can be used as statement references in exec_* methods.

This trait is sealed and cannot be implemented outside this crate.

Required Methods§

Source

fn needs_parse(&self) -> bool

Returns true if this is raw SQL (needs Parse message).

Source

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

Get the SQL string if this is raw SQL.

Source

fn as_prepared(&self) -> Option<&PreparedStatement>

Get the prepared statement if this is a prepared statement reference.

Implementations on Foreign Types§

Source§

impl IntoStatement for &&str

Source§

impl IntoStatement for &str

Source§

impl IntoStatement for str

Implementors§