Trait atmosphere::Bindable

source ·
pub trait Bindable<'q> {
    // Required method
    fn dyn_bind<T>(self, value: T) -> Self
       where T: 'q + Send + Encode<'q, Postgres> + Type<Postgres>;
}
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>(self, value: T) -> Self
where T: 'q + Send + Encode<'q, Postgres> + Type<Postgres>,

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'q> Bindable<'q> for Query<'q, Postgres, <Postgres as HasArguments<'q>>::Arguments>

source§

fn dyn_bind<T>( self, value: T ) -> Query<'q, Postgres, <Postgres as HasArguments<'q>>::Arguments>
where T: 'q + Send + Encode<'q, Postgres> + Type<Postgres>,

source§

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

source§

fn dyn_bind<T>(self, value: T) -> QueryBuilder<'q, Postgres>
where T: 'q + Send + Encode<'q, Postgres> + Type<Postgres>,

source§

impl<'q, E> Bindable<'q> for QueryAs<'q, Postgres, E, <Postgres as HasArguments<'q>>::Arguments>

source§

fn dyn_bind<T>( self, value: T ) -> QueryAs<'q, Postgres, E, <Postgres as HasArguments<'q>>::Arguments>
where T: 'q + Send + Encode<'q, Postgres> + Type<Postgres>,

Implementors§