Permalink
Browse files

Fixed issue with serializatoin of start / end in range queries

  • Loading branch information...
1 parent 93eadf6 commit 2fcab3193d5a086e95961328bf53ed8bc7222595 @devdazed devdazed committed Aug 3, 2012
Showing with 19 additions and 5 deletions.
  1. +6 −1 History.md
  2. +12 −3 lib/column_family.js
  3. +1 −1 package.json
View
@@ -157,4 +157,9 @@
* Fixed issue with removing composites [ @calvinfo #59 ]
* Added tests for Composite Removal [ @calvinfo #60 ]
- * Fix and Test for Counter Columns not returning Numbers in CQL [ @calvinfo #62 ]
+ * Fix and Test for Counter Columns not returning Numbers in CQL [ @calvinfo #62 ]
+
+0.5.6 / 2012-08-03
+==================
+
+ * Fixed issue with serializatoin of start / end in range queries [ @devdazed ]
View
@@ -139,7 +139,8 @@ function getColumns(columns, options){
* @returns {SlicePredicate}
*/
function getSlicePredicate(options, serializer){
- var predicate = new ttype.SlicePredicate();
+ var predicate = new ttype.SlicePredicate(),
+ start = '', end = '';
if(Array.isArray(options.columns)){
var cols = [], i = 0, len = options.columns.length;
@@ -148,9 +149,17 @@ function getSlicePredicate(options, serializer){
}
predicate.column_names = cols;
} else {
+ if(options.start){
+ start = serializer.serialize(options.start);
+ }
+
+ if(options.end){
+ end = serializer.serialize(options.end);
+ }
+
predicate.slice_range = new ttype.SliceRange({
- start:options.start,
- finish:options.end,
+ start:start,
+ finish:end,
reversed:options.reversed,
count:options.max
});
View
@@ -1,6 +1,6 @@
{
"name": "helenus"
- , "version": "0.5.5"
+ , "version": "0.5.6"
, "description": "NodeJS Bindings for Cassandra"
, "keywords": ["cassandra"]
, "author": "Russell Bradberry <rbradberry@gmail.com>"

0 comments on commit 2fcab31

Please sign in to comment.