Closed aorlowskiddm closed 10 months ago
It was just my misunderstanding of the library. My thought was that if the record previously existed, an error would be given. However, the actual result is that the insert silently fails.
I confirmed that the IF NOT EXISTS
was being appended to the query by checking the generated queries by running the node server with the specified command:
DEBUG=express-cassandra npm run dev
"cassandra-driver": "^4.7.2", "express-cassandra": "^2.9.0", node v18.16.0
I am trying to conditionally save a record with the
IF NOT EXISTS
flag:The
if_not_exist
flag seems to be doing nothing. It overwrites the prior data if it exists. I was able to reproduce this issue with a very simple model: