pub trait UpdateStatement: Sized {
type OutputFields: FieldsConsListItem;
type UpdateTable: Table;
type HasWhereClause: TypedBool;
type HasReturningClause: TypedBool;
type UpdateSet: UpdateSet;
// Required methods
fn write_update_set<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Result
where 's: 'a;
fn write_where_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Result
where 's: 'a;
fn write_returning_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Result
where 's: 'a;
// Provided method
fn write_sql_string<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Result
where 's: 'a { ... }
}Expand description
Represents any type of sql update statement.
Required Associated Types§
Sourcetype OutputFields: FieldsConsListItem
type OutputFields: FieldsConsListItem
A type identifying the output fields of this update statement, selected
in its RETURNING clause.
Sourcetype UpdateTable: Table
type UpdateTable: Table
The table that this statement updates.
Sourcetype HasWhereClause: TypedBool
type HasWhereClause: TypedBool
Does this update statement have a WHERE clause?
Sourcetype HasReturningClause: TypedBool
type HasReturningClause: TypedBool
Does this update statement have a RETURNING clause?
Required Methods§
Sourcefn write_update_set<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
fn write_update_set<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
Writes the update set of this update statement.
This is a list of comma seperated assignments to columns of the table.
Sourcefn write_where_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
fn write_where_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
Writes the WHERE clause of this update statement.
Sourcefn write_returning_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
fn write_returning_clause<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
Writes the RETURNING clause of this update statement.
Provided Methods§
Sourcefn write_sql_string<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
fn write_sql_string<'s, 'a>(
&'s self,
f: &mut String,
parameter_binder: &mut ParameterBinder<'a>,
) -> Resultwhere
's: 'a,
Writes this update statement as an sql string.
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.