Is it possible to run CQL3 queries “create table”, “insert into” with Astyanax?

StackOverflow https://stackoverflow.com/questions/11952724

  •  26-06-2021
  •  | 
  •  

Question

For now I have found just "select" examples.

Or is it possible to do with e.g. MutationBatch?

MutationBatch m = keyspace.prepareMutationBatch();
ColumnListMutation<String> cfmStandard = m.withRow(MY_CF, ...);

my column family is:

 CREATE TABLE my_cf (
                   ... key text,
                   ... timeid timeuuid,
                   ...   flag boolean,
                   ...   data text,
                   ... PRIMARY KEY (key, timeid));
Was it helpful?

Solution

worked for inserts and create:

keyspace.prepareQuery(MY_CF).withCql(queryBuilder.toString()).execute();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top