Does Cassandra::getWhere() require at least one condition to be equals?
Mark-K opened this issue · 1 comments
Please let me ask one question (maybe two).
(Since I could not reopen the previous issue #10. I created a new one. Sorry if that is not appropriate.)
For the test cases containing getWhere tests, the where array is either the only condition is an equals comparison ('age' => 34)
or the first condition is as equals comparison ('age', Cassandra::OP_EQ, 34) and the other condition is not ('name', Cassandra::OP_LTE, 'K').
Calling getWhere when the only condition is not an equals expression
or when none of the conditions are an equals expression results in an exception.
In order to do a range comparison a single column it appears a dummy column with a constant value is required so that
the getWhere equal expression requirement can be satisfied. As in:
array(array('one', OP_EQ, 1), array('name', OP_GTE, 'f'))
When using getWhere() is one of the conditions required to be an equals comparison?
If so, could a statement to that effect be added to the comment for the getWhere method?
Well no, but to do range queries, you need to use order-preserving partitioner.