Trait StatementInput

Source
pub trait StatementInput {
    type Item: SqlValue;

    // Required methods
    fn to_value(self) -> Either<Vec<Self::Item>, ()> ;
    fn to_sql(&self) -> &str;

    // Provided method
    fn values(
        self,
    ) -> Result<Either<Vec<Box<dyn InputParameter>>, ()>, OdbcHelperError>
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

fn to_value(self) -> Either<Vec<Self::Item>, ()>

Source

fn to_sql(&self) -> &str

Provided Methods§

Source

fn values( self, ) -> Result<Either<Vec<Box<dyn InputParameter>>, ()>, OdbcHelperError>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl StatementInput for &str

Source§

type Item = &str

Source§

fn to_value(self) -> Either<Vec<Self::Item>, ()>

Source§

fn to_sql(&self) -> &str

Source§

impl StatementInput for String

Source§

type Item = String

Source§

fn to_value(self) -> Either<Vec<Self::Item>, ()>

Source§

fn to_sql(&self) -> &str

Implementors§

Source§

impl<T> StatementInput for Statement<T>
where T: SqlValue + Debug,

Source§

type Item = T