$update
Update records in the table based on the provided conditions. The $update method is used to modify specific fields of one or multiple records, depending on the conditions provided.
Query
Parameter's
var updatedMember = await Member.$update({
$where: {
username: {
$startsWith: 'Joh'
}
},
$update: {
$uppercase: {
username: true
}
},
$rules: {
username: {
$alphaNumeric: true
}
},
$options: {
$multi: false,
$cache: { $key: 'member', $ttl: 60_000 }
}
});
Last updated