Skip to main content

AssignmentsTarget

Trait AssignmentsTarget 

Source
pub trait AssignmentsTarget {
    type Assignments<'target>
       where Self: 'target;

    // Required method
    fn write_assignments<C: Columns + ?Sized, M>(
        &mut self,
        assignments: FieldValues<M>,
    ) -> Self::Assignments<'_>;
}
Expand description

A query that merge-patch writes can be written into: the assignments of an UPDATE … SET.

Required Associated Types§

Source

type Assignments<'target>
where Self: 'target,

What writing the assignments returns, to add more of them (for sqlx, the comma-separated builder).

Required Methods§

Source

fn write_assignments<C: Columns + ?Sized, M>( &mut self, assignments: FieldValues<M>, ) -> Self::Assignments<'_>

Write column = value assignments of the model M, each to the column C stores its domain field in.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AssignmentsTarget for UpdateStatement

Available on crate feature merge-patch only.
Source§

type Assignments<'target> = &'target mut UpdateStatement

Source§

fn write_assignments<C: Columns + ?Sized, M>( &mut self, assignments: FieldValues<M>, ) -> Self::Assignments<'_>

Implementors§

Source§

impl<'args, DB: BindValues> AssignmentsTarget for QueryBuilder<'args, DB>

Available on crate feature merge-patch only.
Source§

type Assignments<'target> = Separated<'target, 'args, DB, &'static str>
where Self: 'target,