举例说明:
import cql
cql connect to CF/Keyspace
last_key = XYZ (say it's getting fetched from else where)
cursor.execute(select * from domain_dimension where key=:key", key="last_key")CQL文档说这是可以做到的,但是在控制台上它说execute()得到了意外的关键字参数。
Cassandra CQL真的支持查询替换吗?
发布于 2012-01-07 09:15:41
看起来您需要在dict中将替换作为单个arg传递,而不是作为关键字args。
cursor.execute("select * from domain_dimension where key=:key", {'key': last_key})这就是它在项目主页上的示例中指定的方式:http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/
https://stackoverflow.com/questions/8766089
复制相似问题