I want to generate a DELETE statement with Cequel:
DELETE FROM users where pk = 'jsmith' and cc < 100;
Let's say my user model looks like this
class Users
include Cequel::Record
key :pk, :bigint, { partition: true } # partition key
key :cc, :timestamp, { order: :desc } # clustering column
end
Right now, I am iterating through the rows using a simple where clause and destroy them one by one, I know this is not the right way to do it, but I can't find a way to generate the correct statement to delete them all at once.
How can I use my Users
model to generate the above CQL statement.
EDIT: also posted here