$reverse

Update records by reversing the characters in a string column. The $reverse method is used to modify text fields by flipping the order of characters in a given value, effectively reversing the string. This is useful when you need to alter or analyze string data in reverse order.

await Member.$update({
    $where: { 
        age: { 
            $eq: 16 
        } 
    },
    $update: {
       $reverse: {
         username: true
       }
    }
});

Last updated