Rohan Rajpal
08/23/2022, 12:06 PMonly if
a record exists?
Currently I have to first check if it exists & then update, can we do it in one query with prisma? One option is ofcourse try-catch but was curious if some better method existsIrek Prucnal
08/23/2022, 12:13 PMRohan Rajpal
08/23/2022, 12:17 PMupdateIfExists
is implemented, its gonna make my life easier.Irek Prucnal
08/23/2022, 12:40 PMRETURNING
clause used. Thus, I'd rather expect update
to return an empty array for example.Nurul
08/23/2022, 1:08 PMRohan Rajpal
08/23/2022, 2:04 PMRohan Rajpal
08/23/2022, 2:06 PMChris Tsongas
08/23/2022, 5:27 PMupdateMany()
? I don't think it errors if no records are found, should just return zero updated.Chris Tsongas
08/23/2022, 5:28 PMwhere
would just be id: whatever
so obviously only one record would ever get updated.Rohan Rajpal
08/26/2022, 8:02 PM