简体   繁体   English

Cassandra 4.0 使用 java 驱动程序用于多个 select

[英]Cassandra 4.0 using java driver for multiple select

Trying to to send multiple select in a single batch fails with error message:尝试在单个批次中发送多个 select 失败并显示错误消息:

Invalid statement in batch: only UPDATE, INSERT and DELETE statements are allowed.批处理中的无效语句:只允许 UPDATE、INSERT 和 DELETE 语句。

What is the best way to send multiple distinct queries (eg id=x, id=y, id=z).发送多个不同查询的最佳方式是什么(例如 id=x、id=y、id=z)。

You can't do this for selects, and it's really doesn't make sense imho.您不能为选择执行此操作,而且恕我直言,这真的没有意义。 Send each query as a separate requests & collect results.将每个查询作为单独的请求发送并收集结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM