FluentCassandra范围选择问题
我在使用 c# 和 FluentCassandra 从 Cassandra 获取一些数据时遇到问题。 在我的 Cassandra 键空间中,我有以下超级列族定义:
<ColumnFamily Name="MySCFName"
ColumnType="Super"
CompareWith="TimeUUIDType"
CompareSubcolumnsWith="AsciiType"/>
我想要做的是对此超级列族运行查询,类似于 sql 中的以下内容:
select "something" from MyTable where "timestamp" between "2011-01-01 00:00:00.000" and "2011-03-01 00:00:00.000"
按照一个教程,我发现我可以使用以下命令从 Cassandra 中获取一些数据:
family.Get("238028210009775").Fetch(DateTime.Parse("2011-01-01 00:00:00.000")).FirstOrDefault();
但这在 sql "timestamp" > 中是等效的“2011-01-01 00:00:00.000”
到目前为止,我无法弄清楚如何从一系列值中检索数据。
任何提示或帮助将不胜感激:) 提前致谢, 尼古拉
I have a problem in getting some data out from Cassandra using c# and FluentCassandra.
In my Cassandra keyspace i have the following super column family definition:
<ColumnFamily Name="MySCFName"
ColumnType="Super"
CompareWith="TimeUUIDType"
CompareSubcolumnsWith="AsciiType"/>
What i would like to do is run a query on this supercolumnfamily similar to the following in sql:
select "something" from MyTable where "timestamp" between "2011-01-01 00:00:00.000" and "2011-03-01 00:00:00.000"
Following one tutorial i found i can get some data out of Cassandra with the following command:
family.Get("238028210009775").Fetch(DateTime.Parse("2011-01-01 00:00:00.000")).FirstOrDefault();
but this is equivalent in sql "timestamp" > "2011-01-01 00:00:00.000"
and so far i cannot figure out how to retrieve data from a range of values.
Any hints or help will be appreciated :)
Thanks in advance,
Nicola
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够通过以下操作来完成此操作:
You should be able to do it with the following: