是否可以运行CQL3查询“创建表”,“插入”与Astyanax?
问题描述:
现在我已经找到了“选择”示例。是否可以运行CQL3查询“创建表”,“插入”与Astyanax?
或者是否有可能与例如MutationBatch?
MutationBatch m = keyspace.prepareMutationBatch();
ColumnListMutation<String> cfmStandard = m.withRow(MY_CF, ...);
我列族是:
CREATE TABLE my_cf (
... key text,
... timeid timeuuid,
... flag boolean,
... data text,
... PRIMARY KEY (key, timeid));
答
工作了刀片和创造:
keyspace.prepareQuery(MY_CF).withCql(queryBuilder.toString()).execute();
Astyanax forewer!得到的插入工作:'CqlResult cqlResult = keyspace.prepareQuery(MY_CF).withCql(insertBuilder.toString())。execute()。getResult();'会尝试创建表,但不太可能这将工作... –
2012-08-14 13:07:04
创建表以相同的方式工作)道歉astyanax家伙! – 2012-08-16 13:22:45