Bindable

Trait Bindable 

Source
pub trait Bindable<'q> {
    // Required method
    fn dyn_bind<T: 'q + Send + Encode<'q, Driver> + Type<Driver>>(
        self,
        value: T,
    ) -> Self;
}
Expand description

Trait for dynamic binding of values.

Bindable provides an abstraction over different types of SQL queries, such as sqlx::query::Query and sqlx::query::QueryAs, allowing for flexible and dynamic binding of values. It is designed to work with various query types and enables the binding of values with different types and constraints.

Required Methods§

Source

fn dyn_bind<T: 'q + Send + Encode<'q, Driver> + Type<Driver>>( self, value: T, ) -> Self

Binds a value to the query. The value must be compatible with the atmosphere::Driver.

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.

Implementations on Foreign Types§

Source§

impl<'q> Bindable<'q> for Query<'q, Driver, <Driver as Database>::Arguments<'q>>

Source§

fn dyn_bind<T: 'q + Send + Encode<'q, Driver> + Type<Driver>>( self, value: T, ) -> Self

Source§

impl<'q> Bindable<'q> for QueryBuilder<'q, Driver>

Source§

fn dyn_bind<T: 'q + Send + Encode<'q, Driver> + Type<Driver>>( self, value: T, ) -> Self

Source§

impl<'q, E> Bindable<'q> for QueryAs<'q, Driver, E, <Driver as Database>::Arguments<'q>>

Source§

fn dyn_bind<T: 'q + Send + Encode<'q, Driver> + Type<Driver>>( self, value: T, ) -> Self

Implementors§