Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an "IF EXISTS UPDATE ELSE INSERT" command in CQL (Cassandra)?

Tags:

cassandra

Is there an "IF EXISTS UPDATE ELSE INSERT" command in CQL (Cassandra)? If not, what's the most efficient way to perform such a query?

like image 572
Justin Borromeo Avatar asked Apr 13 '17 15:04

Justin Borromeo


1 Answers

Basically you should use update. In cassandra they have a bit different mechanics when compared to relational world and will work as implied inserts.

Answer: Does an UPDATE become an implied INSERT

like image 60
Marko Švaljek Avatar answered Oct 02 '22 09:10

Marko Švaljek