Skip to main content

clear

Function clear 

Source
pub fn clear<T>() -> Assignment<List<T>>
Expand description

Remove every element from an ordered collection field.

Produces an assignment for List<T> that replaces the column with an empty list. Equivalent to passing an empty Vec to the field setter, just more explicit at the call site.

§Examples

ⓘ
user.update()
    .tags(stmt::clear())
    .exec(&mut db)
    .await?;