是否有可能在CQL3查询中运行“创建表",“插入"查询.与Astyanax? [英] Is it possible to run CQL3 queries "create table", "insert into" with Astyanax?
本文介绍了是否有可能在CQL3查询中运行“创建表",“插入"查询.与Astyanax?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
到目前为止,我仅发现了选择"示例.
For now I have found just "select" examples.
或者可能与MutationBatch?
Or is it possible to do with e.g. 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();
这篇关于是否有可能在CQL3查询中运行“创建表",“插入"查询.与Astyanax?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文