我有一个功能:
export async function deleteFavoriteTrack({profileId, trackId}) { await db.delete(favoriteTracks).where(eq(favoriteTracks.profileId, profileId)); }
字符串我只能写一个“eq”。我怎么能在prisma中写like:
where { profileId, trackId }
型
1u4esq0p1#
你想删除两个相等的favoriteTrack?听起来AND就是你想要的!
favoriteTrack
AND
await db.delete(favoriteTracks).where( and( eq(favoriteTracks.profileId, profileId), eq(favoriteTracks.trackId, trackId), ) )
字符串
1条答案
按热度按时间1u4esq0p1#
你想删除两个相等的
favoriteTrack
?听起来AND
就是你想要的!字符串