onConflictDoNothing does not exist on planetscale client
i am getting an "Property onConflictDoNothing does not exist on type" on the following script....
the client is a type of
PlanetScaleDatabase<typeof schema>
the only typesafe method i get is onDuplicateKeyUpdate
5 Replies
oh hang on....is this what im looking for? this doesn't appear to be in the docs....
Did this .ignore() end up being what you were looking for @frostyghostman ? Just ran into this myself.
bumping this, i just ran into it aswell.
ignore does indeed work. It just adds the
ignore
keyword to the sql query, with more info on it found hereStack Overflow
"INSERT IGNORE" vs "INSERT ... ON DUPLICATE KEY UPDATE"
While executing an INSERT statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:
ON DUPLICAT...
oh nice, forgot i even asked this and went back to ask again and found my original question answered haha