$lowercase

Update records by converting all characters in a string column to lowercase. The $lowercase method is used to modify text fields by making all characters in a string lowercase, ensuring consistent formatting, especially when case-insensitive comparisons or standardized text input are required.

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

Last updated