Python 2.7 查询大于今天的记录';使用cqlengine的日期

Python 2.7 查询大于今天的记录';使用cqlengine的日期,python-2.7,cassandra,cqlengine,Python 2.7,Cassandra,Cqlengine,我想查询具有今天日期的记录。下面给出了我正在尝试的cql代码 cron = Cron.objects.filter(user_id = 5) cron= cron.filter(created_at__gte = datetime.combine(datetime.now().date(), datetime.min.time())) cron= cron.allow_filtering() result = cron.first() 我在表

我想查询具有今天日期的记录。下面给出了我正在尝试的cql代码

cron = Cron.objects.filter(user_id = 5)
        cron= cron.filter(created_at__gte = datetime.combine(datetime.now().date(), datetime.min.time()))
        cron= cron.allow_filtering()
        result =  cron.first() 
我在表中没有今天的记录,仍然在查询结果中得到昨天的记录

表中日期的格式为“2015-10-21 08:29:41-0400”(时间戳)


我在cqlengine文件中找不到任何关于这个案件的参考资料。如果有人能帮上忙,那你就太好了

在Cassandra中,您不能在任何地方绑定或过滤您想要的内容。Cassandra中有一些限制,您可以按顺序查询,首先是分区键,然后是集群键

如果集群密钥是timeuuid、deateime或date字段,则可以查询大于今天的数据

class Blog(Model):
   content_type = Text(partition_key=True)
   content_id = Date(primary_key=True)
query=Blog.object(content\u type='article'和content\u id\u gte=datetime.now().date())

你可以这样试试