我的 Cassandra 表如下所示:
uid | flwuid | tuuid
------------------------+----------------------------+--------------------------------------
0x50f893bf620d628f0500 | 0x527ce3c3c5ebc4dd7e8b4567 | 1e970c24-488d-11e3-b19a-7054d219d35c
0x505a31a507b8d04b0005 | 0x526a66cbc5ebc4d3708b456c | 6081f230-4797-11e3-b9af-7054d219d35c
0x505a31a507b845000005 | 0x527ce3c3c5ebc4dd7e8b4567 | 9da514bc-4878-11e3-bcb1-7054d219d35c
0x51ee6cef6cbf7679f7a0 | 0x524bfd0dc5ebc486738b4567 | 6bdf89c6-4b93-11e3-a8a0-7054d219d35c
0x51ee160a6cbf7679f7a0 | 0x526a7149c5ebc494708b456c | 8e8a1c4c-45fe-11e3-9b35-7054d219d35c
我有一个 cqlengine 模型:
class Followers(Model):
uid = cqlengine.Bytes(primary_key=True)
flwuid = cqlengine.Bytes(primary_key=True)
tuuid = cqlengine.TimeUUID()
uid
要使用=获取所有行,0x50f893bf620d628f0500
我正在尝试这样做:
Followers.objects(uid='0x50f893bf620d628f0500')
但得到一个例外:
CQLEngineException: Bad Request: Invalid STRING constant (3078353066383933626636323064363238663035303030303061) for uid of type blob
如何为 cqlengine 的查询指定正确的 blob 值?
卡桑德拉 2.0.1,cqlengine 0.9.1。
提前致谢。