pub type UpdateBuilder<'a, Schema, State, Table> = QueryBuilder<'a, Schema, State, Table>;Expand description
Builds an UPDATE query specifically for PostgreSQL
Aliased Type§
pub struct UpdateBuilder<'a, Schema, State, Table> {
pub sql: SQL<'a, PostgresValue<'a>>,
/* private fields */
}Fields§
§sql: SQL<'a, PostgresValue<'a>>Implementations§
Source§impl<'a, Schema, Table> UpdateBuilder<'a, Schema, UpdateInitial, Table>
impl<'a, Schema, Table> UpdateBuilder<'a, Schema, UpdateInitial, Table>
Sourcepub fn set(
self,
values: Table::Update,
) -> UpdateBuilder<'a, Schema, UpdateSetClauseSet, Table>
pub fn set( self, values: Table::Update, ) -> UpdateBuilder<'a, Schema, UpdateSetClauseSet, Table>
Sets the values to update and transitions to the SetClauseSet state
Source§impl<'a, S, T> UpdateBuilder<'a, S, UpdateSetClauseSet, T>
impl<'a, S, T> UpdateBuilder<'a, S, UpdateSetClauseSet, T>
Sourcepub fn from(
self,
source: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateFromSet, T>
pub fn from( self, source: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateFromSet, T>
Adds a FROM clause and transitions to the FromSet state
Sourcepub fn where(
self,
condition: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateWhereSet, T>
pub fn where( self, condition: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateWhereSet, T>
Adds a WHERE condition and transitions to the WhereSet state
Sourcepub fn returning(
self,
columns: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
pub fn returning( self, columns: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
Adds a RETURNING clause and transitions to the ReturningSet state
Source§impl<'a, S, T> UpdateBuilder<'a, S, UpdateFromSet, T>
impl<'a, S, T> UpdateBuilder<'a, S, UpdateFromSet, T>
Sourcepub fn where(
self,
condition: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateWhereSet, T>
pub fn where( self, condition: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateWhereSet, T>
Adds a WHERE condition after FROM
Sourcepub fn returning(
self,
columns: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
pub fn returning( self, columns: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
Adds a RETURNING clause after FROM
Source§impl<'a, S, T> UpdateBuilder<'a, S, UpdateWhereSet, T>
impl<'a, S, T> UpdateBuilder<'a, S, UpdateWhereSet, T>
Sourcepub fn returning(
self,
columns: impl ToSQL<'a, PostgresValue<'a>>,
) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
pub fn returning( self, columns: impl ToSQL<'a, PostgresValue<'a>>, ) -> UpdateBuilder<'a, S, UpdateReturningSet, T>
Adds a RETURNING clause after WHERE