Prepared语句与Datastax Cassandra CQL驱动程序IN子句中的集合 [英] Prepared Statement with collection in IN clause in Datastax Cassandra CQL driver

查看:193
本文介绍了Prepared语句与Datastax Cassandra CQL驱动程序IN子句中的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行以下查询

SELECT edge_id, b_id FROM booking_by_edge WHERE edge_id IN ?

我绑定Long的Long列表作为参数,我得到一个异常

I bind Java list of Long's as a parameter and I get an exception

SyntaxError: line 0:-1 mismatched input '<EOF>' expecting ')' (ResultSetFuture.java:242)

如果我尝试使用(?)它期望单个长项目绑定,但我需要一个集合

If I try to use (?) it expects single Long item to be bound, but I need a collection

我的语法有错误吗?

推荐答案

Datastax bugzilla目前不支持,但计划

Got response on Datastax bugzilla, it is currently not supported, but planned

https://issues.apache.org/jira/browse/CASSANDRA-4210

更新:支持Cassandra 2.0.1

Update: Supported in Cassandra 2.0.1

这篇关于Prepared语句与Datastax Cassandra CQL驱动程序IN子句中的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆