pub struct UpdateQuery {Show 14 fields
pub table: String,
pub target: UpdateTarget,
pub assignment_exprs: Vec<(String, Expr)>,
pub compound_assignment_ops: Vec<Option<BinOp>>,
pub assignments: Vec<(String, Value)>,
pub where_expr: Option<Expr>,
pub filter: Option<Filter>,
pub ttl_ms: Option<u64>,
pub expires_at_ms: Option<u64>,
pub with_metadata: Vec<(String, Value)>,
pub returning: Option<Vec<ReturningItem>>,
pub order_by: Vec<OrderByClause>,
pub limit: Option<u64>,
pub suppress_events: bool,
}Expand description
UPDATE table SET col=val, … WHERE filter [WITH TTL duration] [WITH METADATA (…)]
Fields§
§table: StringTarget table name
target: UpdateTargetExplicit item-kind target. Omitted targets default to rows.
assignment_exprs: Vec<(String, Expr)>Canonical SQL assignments.
compound_assignment_ops: Vec<Option<BinOp>>Per-assignment compound operator for SET col += expr forms.
None means ordinary SET col = expr.
assignments: Vec<(String, Value)>Best-effort literal-only cache of assignments. Non-foldable expressions
are preserved exclusively in assignment_exprs and evaluated later
against the row pre-image by the runtime.
where_expr: Option<Expr>Canonical SQL WHERE clause.
filter: Option<Filter>Optional WHERE filter
ttl_ms: Option<u64>Optional TTL in milliseconds (from WITH TTL clause)
expires_at_ms: Option<u64>Optional absolute expiration (from WITH EXPIRES AT clause)
with_metadata: Vec<(String, Value)>Optional metadata key-value pairs (from WITH METADATA clause)
returning: Option<Vec<ReturningItem>>Optional RETURNING clause items.
order_by: Vec<OrderByClause>Optional deterministic target ordering for limited UPDATE batches.
limit: Option<u64>Optional LIMIT N cap. Caps the number of targets the executor
will mutate in a single statement. Required by BATCH N ROWS
data migrations (#37) which run the same UPDATE body in a
loop, advancing a checkpoint between batches.
suppress_events: boolSkip event subscription emission for this statement (SUPPRESS EVENTS).
Trait Implementations§
Source§impl Clone for UpdateQuery
impl Clone for UpdateQuery
Source§fn clone(&self) -> UpdateQuery
fn clone(&self) -> UpdateQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for UpdateQuery
impl RefUnwindSafe for UpdateQuery
impl Send for UpdateQuery
impl Sync for UpdateQuery
impl Unpin for UpdateQuery
impl UnsafeUnpin for UpdateQuery
impl UnwindSafe for UpdateQuery
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request