pub struct Update {
pub with: With,
pub on_conflict: Option<ConflictAction>,
pub target: FromTermId,
pub assignments: Vec<(Vec<NameId>, ExprId)>,
pub from: Vec<FromTermId>,
pub filter: Option<ExprId>,
pub returning: Vec<ResultColumn>,
pub order_by: Vec<OrderTerm>,
pub limit: Option<ExprId>,
pub offset: Option<ExprId>,
pub limited_at: Option<(Limited, Span)>,
}Expand description
An UPDATE statement.
Fields§
§with: WithThe WITH prefix.
on_conflict: Option<ConflictAction>The conflict algorithm from UPDATE OR ....
target: FromTermIdThe target term, which carries its own alias and index hint.
assignments: Vec<(Vec<NameId>, ExprId)>The SET assignments; a group of names is the (a, b) = ... form.
from: Vec<FromTermId>An UPDATE ... FROM clause.
filter: Option<ExprId>The WHERE clause.
returning: Vec<ResultColumn>The RETURNING columns.
order_by: Vec<OrderTerm>The ORDER BY, which SQLite allows with LIMIT.
limit: Option<ExprId>The LIMIT.
offset: Option<ExprId>The OFFSET.
limited_at: Option<(Limited, Span)>Where the clause the reference build has no grammar for was written.
ORDER BY and LIMIT on a DELETE or an UPDATE are a compile-time
option in SQLite, and the pinned build is not compiled with it - so the
reference answers near "ORDER": syntax error and points at the word.
The syntax register requires these to parse here, so the refusal is
the binder’s; it needs the position to be able to point at the same
word, and this is where the parser leaves it.