pub fn pop<T>() -> Assignment<List<T>>Expand description
Drop the last element of an ordered collection field.
Produces an assignment for List<T> that removes the trailing element
of the existing column value. The popped element is discarded โ the
assignment API does not return values. Empty-collection is a no-op
rather than an error; for failure-on-empty semantics, filter the
collection first.
Atomic against the existing column value. Backends that advertise
Capability::vec_pop
support this โ currently PostgreSQL only; other backends return an
error.
ยงExamples
โ
user.update()
.tags(stmt::pop())
.exec(&mut db)
.await?;