Php 结果与Cassandra的结果相反
我有一个列族,其中列名是时间戳。我需要使用升序检索一定数量的列。我怎样才能做到这一点 我实际上在使用PHP和Cassandra PHP客户端库。找到了一个解决方案,使用了Php 结果与Cassandra的结果相反,php,cassandra,Php,Cassandra,我有一个列族,其中列名是时间戳。我需要使用升序检索一定数量的列。我怎样才能做到这一点 我实际上在使用PHP和Cassandra PHP客户端库。找到了一个解决方案,使用了 $data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true); 而不是 $data = $this->cassandra->get(...)
$data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true);
而不是
$data = $this->cassandra->get(...);
第一种方法在较低级别运行,由于第五个参数,我可以颠倒返回数据的顺序。找到了一个解决方案,使用
$data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true);
而不是
$data = $this->cassandra->get(...);
第一种方法在较低的级别上运行,由于第五个参数,我可以反转返回数据的顺序。您可以使用类似CQL的“从测试中选择前10个反转的“b”…“a”,其中KEY='dfdsf';”并尝试通过phpcassa或Cassandra PHP执行它。您可以使用类似CQL的方法执行此操作“从测试中选择前10个反向'b'..'a',其中键='dfdsf';并尝试通过phpcassa或cassandraphppdo执行它