Fishie
09/22/2022, 9:13 AMroleIds: String[]
How can I delete 1 value from many users?
await prisma.serverMember.updateMany({where: {roleIds: {has: roleId}}, data: {
roleIds: // what goes here?
}});
Fishie
09/22/2022, 11:13 AMRaphael Etim
09/22/2022, 11:28 AMupdate
operation.
There is a feature request for this, please feel free to follow/comment with your use-case to help us track demand for this feature.Raphael Etim
09/22/2022, 11:29 AMFishie
09/22/2022, 11:46 AMFishie
09/22/2022, 11:46 AMFishie
09/22/2022, 11:46 AMFishie
09/22/2022, 11:47 AMFishie
09/22/2022, 11:49 AMFishie
09/22/2022, 11:49 AMRaphael Etim
09/22/2022, 11:52 AMUPDATE table_name
SET column_name=(array_remove(column, 'keyword to be removed'))
WHERE 'keyword to be removed' = ANY(column_name);
Fishie
09/22/2022, 12:00 PMRaphael Etim
09/22/2022, 12:02 PMFishie
09/22/2022, 1:16 PMRaphael Etim
09/22/2022, 1:18 PM