Hi,

I'm using a Cassandra table to store some data. I created the table like
this:
CREATE TABLE IF NOT EXISTS table_name (s BLOB, p BLOB, o BLOB, c BLOB,
PRIMARY KEY (s, p, o, c));

I need the at least the p column to be sorted, so that I can use it in a
WHERE clause. So as far as I understand, the s column is now the row
key, and (p, o, c) is the column name.

I tried to delete single entries with a prepared statement like this:
DELETE p, o, c FROM table_name WHERE s = ? AND p = ? AND o = ? AND c = ?;

That didn't work, because p is a primary key part. It failed during
preparation.

I also tried to use variables like this:
DELETE ?, ?, ? FROM table_name WHERE s = ?;

This also failed during preparation, because ? is an unknown identifier.


Since I have multiple different p, o, c combinations per s, deleting the
whole row identified by s is no option. So how can I delete a s, p, o, c
tuple, without deleting other s, p, o, c tuples with the same s? I know
that this worked with Thrift/Hector before.

Regards,
Sebastian

Reply via email to