nothing_authentic
nothing_authentic

Reputation: 3187

Update CQL Cassandra using Play Framework

I have a requirement where I need to update a column value for CQL cassandra table. I tried Kundera but seems like it is used for TQL Mode.

Any pointers to use Play for updating CQL cassandra table??

Upvotes: 1

Views: 241

Answers (2)

vivek mishra
vivek mishra

Reputation: 1162

With Kundera you can run as em.createNativeQuery(). Kundera also supports Datastax's java driver btw. This should help you out https://github.com/impetus-opensource/Kundera/blob/273c13342ddd1aceed0cd23504649926ce8fdb84/src/kundera-cassandra/cassandra-core/src/test/java/com/impetus/client/persistence/NativeQueryTest.java

Upvotes: 0

ajnavarro
ajnavarro

Reputation: 738

I recommend you the Datastax cassandra driver. You can do an update like:

Statement statement = QueryBuilder.update("simplex", "songs")
    .with(set("artist", "Vasili Ostertag"))
    .where(eq("id", UUID.fromString("f6071e72-48ec-4fcb-bf3e-379c8a696488")));

getSession().execute(statement);

Upvotes: 2

Related Questions