cat
cat
PPrisma
Created by cat on 9/19/2024 in #help-and-questions
findMany - query table for all values not in another
hey, just trying to sort out a minor problem with a program of mine i'm trying to query a table, Track, and only return the records from the table if TrackID is not in another table, TrackToPlaylist in postgres, syntax for this would be similar to the following:
SELECT * FROM Track
WHERE TrackID NOT IN (SELECT * FROM TrackToPlaylist)
SELECT * FROM Track
WHERE TrackID NOT IN (SELECT * FROM TrackToPlaylist)
however, i'm a little stumped on how to go about implementing this in prisma, i've tried querying the entirety of TrackToPlaylist then filtering to create a list of TrackID's & using it in a not query, but i occasionally run into the following error when there's a lot of tracks
Assertion violation on the database: `too many bind variables in prepared statement, expected maximum of 32767, ...
Assertion violation on the database: `too many bind variables in prepared statement, expected maximum of 32767, ...
3 replies