pub struct Separated<'qb, 'args, DB, Sep>where
'args: 'qb,
DB: Database,{ /* private fields */ }Expand description
The sqlx query builder the clauses are appended to, and the separated
builder Columns::push_assignments returns for it: re-exported so callers
can name the same sqlx as this crate, whatever they call their own sqlx
dependency.
A wrapper around QueryBuilder for creating comma(or other token)-separated lists.
See QueryBuilder::separated() for details.
Implementations§
Source§impl<'qb, 'args, DB, Sep> Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Separated<'qb, 'args, DB, Sep>
Sourcepub fn push(&mut self, sql: impl Display) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push(&mut self, sql: impl Display) -> &mut Separated<'qb, 'args, DB, Sep>
Push the separator if applicable, and then the given SQL fragment.
See QueryBuilder::push() for details.
Sourcepub fn push_unseparated(
&mut self,
sql: impl Display,
) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_unseparated( &mut self, sql: impl Display, ) -> &mut Separated<'qb, 'args, DB, Sep>
Push a SQL fragment without a separator.
Simply calls QueryBuilder::push() directly.
Sourcepub fn push_bind<T>(&mut self, value: T) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_bind<T>(&mut self, value: T) -> &mut Separated<'qb, 'args, DB, Sep>
Push the separator if applicable, then append a bind argument.
See QueryBuilder::push_bind() for details.
Sourcepub fn push_bind_unseparated<T>(
&mut self,
value: T,
) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_bind_unseparated<T>( &mut self, value: T, ) -> &mut Separated<'qb, 'args, DB, Sep>
Push a bind argument placeholder (? or $N for Postgres) and bind a value to it
without a separator.
Simply calls QueryBuilder::push_bind() directly.
Auto Trait Implementations§
impl<'qb, 'args, DB, Sep> !UnwindSafe for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Freeze for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> RefUnwindSafe for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Send for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Sync for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Unpin for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> UnsafeUnpin for Separated<'qb, 'args, DB, Sep>
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more