Functions§
- update_
macro_ embedded_ patch_ and_ mixed_ shapes - Embedded partial update via brace block:
meta: { version: 2 }lowers tometa: stmt::apply([stmt::patch(<Metadata>::fields().version(), 2)]). - update_
macro_ has_ many_ insert - Has-many insert via bracket-of-braces:
todos: [{ title: "x" }]lowers totodos: stmt::apply([stmt::insert(Todo::create().title("x"))]). - update_
macro_ has_ many_ mixed_ list - Has-many list with mixed builders and plain expressions — the macro
passes plain entries through and wraps inline builders in
stmt::insert. - update_
macro_ method_ shorthand_ clear - Method shorthand on a
Vec<scalar>field:tags.clear()lowers totags: stmt::clear(), replacing the field with an empty list. - update_
macro_ method_ shorthand_ extend - Method shorthand on a
Vec<scalar>field:tags.extend([..])lowers totags: stmt::extend([..])for an atomic batch append. - update_
macro_ method_ shorthand_ pop - Method shorthand on a
Vec<scalar>field:tags.pop()lowers totags: stmt::pop()for an atomic trailing-element drop. - update_
macro_ method_ shorthand_ push - Method shorthand on a
Vec<scalar>field:tags.push("rust")lowers totags: stmt::push("rust")for an atomic append. - update_
macro_ method_ shorthand_ reads_ target_ field - Method-shorthand arguments may also read the target instance’s own fields inline (issue #1073).
- update_
macro_ method_ shorthand_ set - Method shorthand:
field.set(value)lowers tofield: stmt::set(value). - update_
macro_ multiple_ fields - Multiple fields in one update call.
- update_
macro_ query_ target - Update through a query builder target — no instance required.
- update_
macro_ shorthand - Field shorthand —
nameas a bare ident expands toname: name. - update_
macro_ simple - Basic single-field update through an instance target.
- update_
macro_ value_ reads_ target_ field - Value expressions may read the target instance’s own fields inline
(issue #1073). The macro evaluates values before
.update()borrows the target, soactive: !user.activecompiles.