6 new revisions:

Revision: 069f526cd9d9
Author:   Dan Foody <d...@cloze.biz>
Date:     Wed Feb 22 13:24:58 2012
Log: Improved support (in both directions) for numbers, dates, and booleans
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=069f526cd9d9

Revision: 04f436ba6060
Author:   Dan Foody <d...@cloze.biz>
Date:     Sat Feb 25 19:22:27 2012
Log:      - Follow coding style in driver.js encodeParam...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=04f436ba6060

Revision: ec9e831e214d
Author:   Dan Foody <d...@cloze.biz>
Date:     Wed May 16 14:04:36 2012
Log:      Fixed indentation issues...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=ec9e831e214d

Revision: 6bb5f8db15de
Author:   Tomaz Muraus <k...@k5-storitve.net>
Date:     Thu May 31 15:55:32 2012
Log:      Merge pull request #22 from dfoody/datatypes...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=6bb5f8db15de

Revision: c823935d27bd
Author:   Tomaz Muraus <k...@k5-storitve.net>
Date:     Thu May 31 15:57:03 2012
Log:      Update CHANGES
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=c823935d27bd

Revision: 031256c57dec
Author:   Gary Dusbabek <gdusba...@gmail.com>
Date:     Fri Jun  1 08:38:00 2012
Log:      bump version to 0.9.3
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=031256c57dec

==============================================================================
Revision: 069f526cd9d9
Author:   Dan Foody <d...@cloze.biz>
Date:     Wed Feb 22 13:24:58 2012
Log: Improved support (in both directions) for numbers, dates, and booleans

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=069f526cd9d9

Modified:
 /lib/decoder.js
 /lib/driver.js

=======================================
--- /lib/decoder.js     Mon Jan 30 10:16:45 2012
+++ /lib/decoder.js     Wed Feb 22 13:24:58 2012
@@ -20,17 +20,23 @@

var v6Buffers = require('buffer').Buffer.prototype.readFloatBE ? true : false;

-// remember: values x such that -2^31 > x or x > 2^31-1 will make this routine puke.
+// This routine will only keep precision up to about +/- 2^52
+// (for date timestamps this covers up to year 144,683 without loss of precision)
 var bytesToNum = module.exports.bytesToNum = function(bytes) {
+ // Handle negative numbers separate from positive numbers to ensure we don't lose precision
   var num = 0;
- // if the sign bit is on, start wtih every bit asserted. we only care about 32 bits because we lose precision after
-  // that anyway.
   if ((0x0080 & bytes[0]) === 0x0080) {
-    num = 0xffffffff;
-  }
-  for (var i = 0; i < bytes.length; i++) {
-    num <<= 8;
-    num |= bytes[i];
+ // Negative number: Compute the positive version of the number then negate it at the end
+    for (var i = 0; i < bytes.length; i++) {
+       num = (num * 256) + ~bytes[i];
+    }
+    num = -num;
+  }
+  else {
+    // Positive number: Accumulate each byte of the number
+    for (var i = 0; i < bytes.length; i++) {
+       num = (num * 256) + bytes[i];
+    }
   }
   return num;
 };
@@ -80,7 +86,7 @@
   LexicalUUIDType: 'org.apache.cassandra.db.marshal.LexicalUUIDType',
   TimeUUIDType: 'org.apache.cassandra.db.marshal.TimeUUIDType',
   DateType: 'org.apache.cassandra.db.marshal.DateType',
-  //BooleanType: 'org.apache.cassandra.db.marshal.BooleanType',
+  BooleanType: 'org.apache.cassandra.db.marshal.BooleanType',
   FloatType: 'org.apache.cassandra.db.marshal.FloatType',
   //DoubleType: 'org.apache.cassandra.db.marshal.DoubleType',
   //DecimalType: 'org.apache.cassandra.db.marshal.DecimalType',
@@ -137,7 +143,10 @@
     return bytes.toString('utf8');
   },
   'org.apache.cassandra.db.marshal.DateType': function(bytes) {
-    return new Date(+bytesToBigInt(bytes).toString());
+      return new Date(bytesToNum(bytes));
+  },
+  'org.apache.cassandra.db.marshal.BooleanType': function(bytes) {
+      return bytes[0] ? true : false;
   },
   'org.apache.cassandra.db.marshal.FloatType': function(bytes) {
     // readFloatBE arrived with Node 0.5. Let's support 0.4.
=======================================
--- /lib/driver.js      Mon Feb 13 11:12:14 2012
+++ /lib/driver.js      Wed Feb 22 13:24:58 2012
@@ -77,6 +77,15 @@
 function fixQuotes(x) {
   return x.replace(/\'/img, '\'\'');
 }
+
+function encodeParam(x) {
+    if((typeof x == 'number') || (typeof x == 'boolean'))
+       return x.toString();
+    else if(x instanceof Date)
+       return '' + x.getTime().toString();
+    else
+       return quote(fixQuotes(stringify(x)));
+}

 /**
* binds arguments to a query. e.g: bind('select ?, ? from MyCf where key=?', ['arg0', 'arg1', 'arg2']);
@@ -100,7 +109,7 @@
       if (args[a] === null) {
         return nullBindError;
       }
-      str += quote(fixQuotes(stringify(args[a++])));
+      str += encodeParam(args[a++]);
       q += 1;
     } else {
       str += query.substr(oldq);

==============================================================================
Revision: 04f436ba6060
Author:   Dan Foody <d...@cloze.biz>
Date:     Sat Feb 25 19:22:27 2012
Log:      - Follow coding style in driver.js encodeParam
- Fixed handling of negative numbers in decoder.js bytesToNum
- Added tests for encoding and deciding dates, boolean, and numbers (including numbers > 32 bits)

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=04f436ba6060

Modified:
 /lib/decoder.js
 /lib/driver.js
 /test/test_decoder.js
 /test/test_driver.js

=======================================
--- /lib/decoder.js     Wed Feb 22 13:24:58 2012
+++ /lib/decoder.js     Sat Feb 25 19:22:27 2012
@@ -28,9 +28,9 @@
   if ((0x0080 & bytes[0]) === 0x0080) {
// Negative number: Compute the positive version of the number then negate it at the end
     for (var i = 0; i < bytes.length; i++) {
-       num = (num * 256) + ~bytes[i];
-    }
-    num = -num;
+       num = (num * 256) + 255-bytes[i];
+    }
+    num = -(num+1);
   }
   else {
     // Positive number: Accumulate each byte of the number
=======================================
--- /lib/driver.js      Wed Feb 22 13:24:58 2012
+++ /lib/driver.js      Sat Feb 25 19:22:27 2012
@@ -79,12 +79,13 @@
 }

 function encodeParam(x) {
-    if((typeof x == 'number') || (typeof x == 'boolean'))
+    if((typeof x == 'number') || (typeof x == 'boolean')) {
        return x.toString();
-    else if(x instanceof Date)
-       return '' + x.getTime().toString();
-    else
+    } else if(x instanceof Date) {
+       return x.getTime().toString();
+    } else {
        return quote(fixQuotes(stringify(x)));
+    }
 }

 /**
=======================================
--- /test/test_decoder.js       Mon Jan 30 10:16:45 2012
+++ /test/test_decoder.js       Sat Feb 25 19:22:27 2012
@@ -56,10 +56,15 @@
assert.strictEqual('2550' ,bytesToNum(makeBuffer('\u0000\u0000\u0000\u0000\u0000\u0000\tö')).toString()); // 2550 assert.strictEqual('8025521', bytesToNum(makeBuffer('\u0000\u0000\u0000\u0000\u0000zu±')).toString()); // 8025521 assert.strictEqual('218025521', bytesToNum(makeBuffer('\u0000\u0000\u0000\u0000\fþÎ1')).toString()); // 218025521
-
-  // these values ensure that none 8 byte sequences work as well.
+ assert.strictEqual('1330225392929', bytesToNum(makeBuffer('\u0000\u0000\u0001\u0035\u00b7\u009c\u00ad\u0021')).toString()); // Sun, 26 Feb 2012 03:03:05 GMT + assert.strictEqual(-1, bytesToNum(makeBuffer('\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff'))); // -1
+
+  // these values ensure that non 8 byte sequences work as well.
+
assert.strictEqual(2147483647, bytesToNum(makeBuffer('\u007f\u00ff\u00ff\u00ff'))); // [127,-1,-1,-1] assert.strictEqual(-2147483648, bytesToNum(makeBuffer('\u0080\u0000\u0000\u0000'))); // [-128,0,0,0] + assert.strictEqual(-256, bytesToNum(makeBuffer('\u00ff\u00ff\u00ff\u0000'))); // [-1,-1,-1,0] + assert.strictEqual(256, bytesToNum(makeBuffer('\u0000\u0000\u0001\u0000'))); // [0,0,1,0]
   assert.strictEqual(-1, bytesToNum(makeBuffer('\u00ff'))); // [-1]
   assert.strictEqual(1, bytesToNum(makeBuffer('\u0001'))); // [1]

=======================================
--- /test/test_driver.js        Mon Feb 13 12:54:50 2012
+++ /test/test_driver.js        Sat Feb 25 19:22:27 2012
@@ -117,6 +117,8 @@
var cfInt = new CfDef({keyspace: ksName, name: 'CfInt', column_type: 'Standard', comparator_type: 'IntegerType', default_validation_class: 'IntegerType', key_validation_class: 'IntegerType'}); var cfUtf8 = new CfDef({keyspace: ksName, name: 'CfUtf8', column_type: 'Standard', comparator_type: 'UTF8Type', default_validation_class: 'UTF8Type', key_validation_class: 'UTF8Type'}); var cfBytes = new CfDef({keyspace: ksName, name: 'CfBytes', column_type: 'Standard', comparator_type: 'BytesType', default_validation_class: 'BytesType', key_validation_class: 'BytesType'}); + var cfBoolean = new CfDef({keyspace: ksName, name: 'CfBoolean', column_type: 'Standard', comparator_type: 'BooleanType', default_validation_class: 'BooleanType', key_validation_class: 'BooleanType'}); + var cfDate = new CfDef({keyspace: ksName, name: 'CfDate', column_type: 'Standard', comparator_type: 'DateType', default_validation_class: 'DateType', key_validation_class: 'DateType'}); var cfUuid = new CfDef({keyspace: ksName, name: 'CfUuid', column_type: 'Standard', comparator_type: 'TimeUUIDType', default_validation_class: 'TimeUUIDType', key_validation_class: 'TimeUUIDType'}); var cfUgly = new CfDef({keyspace: ksName, name: 'CfUgly', column_type: 'Standard', comparator_type: 'UTF8Type', default_validation_class: 'LongType', key_validation_class: 'IntegerType',
@@ -127,7 +129,7 @@
                               ]});
var cfCounter = new CfDef({keyspace: ksName, name: 'CfCounter', column_type: 'Standard', comparator_type: 'AsciiType', default_validation_class: 'CounterColumnType', key_validation_class: 'AsciiType'}); var super1 = new CfDef({keyspace: ksName, name: 'Super1', column_type: 'Super', comparator_type: 'UTF8Type', subcomparator_type: 'UTF8Type'}); - var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfUuid, cfUgly, cfCounter]}); + var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfBoolean, cfDate, cfUuid, cfUgly, cfCounter]});
       sys.addKeyspace(keyspace1, function(addErr) {
         console.log(addErr);
         close();
@@ -382,20 +384,20 @@
       con.connectionInfo.use_bigints = false;
       assert.strictEqual(con.connectionInfo.use_bigints, false);

-      var updParms = [1,2,99];
+      var updParms = [1,-2,9999999999];
con.execute('update CfLong set ?=? where key=?', updParms, function(updErr) {
         if (updErr) {
           con.close();
           assert.ok(false);
           test.finish();
         } else {
- con.execute('select ? from CfLong where key=?', [1, 99], function(selErr, rows) { + con.execute('select ? from CfLong where key=?', [1, 9999999999], function(selErr, rows) {
             con.close();
             assert.strictEqual(rows.rowCount(), 1);
             var row = rows[0];
             assert.strictEqual(1, row.colCount());
             assert.strictEqual(1, row.cols[0].name);
-            assert.strictEqual(2, row.cols[0].value);
+            assert.strictEqual(-2, row.cols[0].value);
             test.finish();
           });
         }
@@ -462,6 +464,57 @@
   });
 };

+exports.testBoolean = function(test, assert) {
+  connect(function(err, con) {
+    assert.ifError(err);
+    var key = 'binarytest';
+    var booleanParams = [true, false, true]
+ con.execute('update CfBoolean set ?=? where key=?', booleanParams, function(updErr) {
+      if (updErr) {
+        con.close();
+        assert.ok(false);
+        test.finish();
+      } else {
+ con.execute('select ? from CfBoolean where key=?', [true, true], function(selErr, rows) {
+          con.close();
+          assert.strictEqual(rows.rowCount(), 1);
+          var row = rows[0];
+          assert.strictEqual(row.key, true);
+          assert.strictEqual(row.cols[0].name, true);
+          assert.strictEqual(row.cols[0].value, false);
+          test.finish();
+        });
+      }
+    });
+  });
+};
+
+exports.testDate = function(test, assert) {
+  connect(function(err, con) {
+    assert.ifError(err);
+    var key = 'binarytest';
+      var now = new Date();
+ var dateParams = [now, now.getTime(), new Date(2021, 11, 11, 11, 11, 11, 111) ] + con.execute('update CfDate set ?=? where key=?', dateParams, function(updErr) {
+      if (updErr) {
+        con.close();
+        assert.ok(false);
+        test.finish();
+      } else {
+ con.execute('select ? from CfDate where key=?', [now, dateParams[2]], function(selErr, rows) {
+          con.close();
+          assert.strictEqual(rows.rowCount(), 1);
+          var row = rows[0];
+          assert.strictEqual(row.key.getTime(), dateParams[2].getTime());
+          assert.strictEqual(row.cols[0].name.getTime(), now.getTime());
+          assert.strictEqual(row.cols[0].value.getTime(), now.getTime());
+          test.finish();
+        });
+      }
+    });
+  });
+};
+
 exports.testLong = function(test, assert) {
   connect(function(err, con) {
     if (err) {

==============================================================================
Revision: ec9e831e214d
Author:   Dan Foody <d...@cloze.biz>
Date:     Wed May 16 14:04:36 2012
Log:      Fixed indentation issues

As per feedback from @Kami

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=ec9e831e214d

Modified:
 /lib/decoder.js
 /lib/driver.js
 /test/test_driver.js

=======================================
--- /lib/decoder.js     Sat Feb 25 19:22:27 2012
+++ /lib/decoder.js     Wed May 16 14:04:36 2012
@@ -28,14 +28,14 @@
   if ((0x0080 & bytes[0]) === 0x0080) {
// Negative number: Compute the positive version of the number then negate it at the end
     for (var i = 0; i < bytes.length; i++) {
-       num = (num * 256) + 255-bytes[i];
+      num = (num * 256) + 255-bytes[i];
     }
     num = -(num+1);
   }
   else {
     // Positive number: Accumulate each byte of the number
     for (var i = 0; i < bytes.length; i++) {
-       num = (num * 256) + bytes[i];
+      num = (num * 256) + bytes[i];
     }
   }
   return num;
=======================================
--- /lib/driver.js      Sat Feb 25 19:22:27 2012
+++ /lib/driver.js      Wed May 16 14:04:36 2012
@@ -79,13 +79,13 @@
 }

 function encodeParam(x) {
-    if((typeof x == 'number') || (typeof x == 'boolean')) {
-       return x.toString();
-    } else if(x instanceof Date) {
-       return x.getTime().toString();
-    } else {
-       return quote(fixQuotes(stringify(x)));
-    }
+  if((typeof x == 'number') || (typeof x == 'boolean')) {
+    return x.toString();
+  } else if(x instanceof Date) {
+    return x.getTime().toString();
+  } else {
+    return quote(fixQuotes(stringify(x)));
+  }
 }

 /**
=======================================
--- /test/test_driver.js        Sat Feb 25 19:22:27 2012
+++ /test/test_driver.js        Wed May 16 14:04:36 2012
@@ -129,7 +129,7 @@
                               ]});
var cfCounter = new CfDef({keyspace: ksName, name: 'CfCounter', column_type: 'Standard', comparator_type: 'AsciiType', default_validation_class: 'CounterColumnType', key_validation_class: 'AsciiType'}); var super1 = new CfDef({keyspace: ksName, name: 'Super1', column_type: 'Super', comparator_type: 'UTF8Type', subcomparator_type: 'UTF8Type'}); - var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfBoolean, cfDate, cfUuid, cfUgly, cfCounter]}); + var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfBoolean, cfDate, cfUuid, cfUgly, cfCounter]});
       sys.addKeyspace(keyspace1, function(addErr) {
         console.log(addErr);
         close();

==============================================================================
Revision: 6bb5f8db15de
Author:   Tomaz Muraus <k...@k5-storitve.net>
Date:     Thu May 31 15:55:32 2012
Log:      Merge pull request #22 from dfoody/datatypes

Improved support (in both directions) for numbers, dates, and booleans
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=6bb5f8db15de

Modified:
 /lib/driver.js
 /test/test_driver.js

=======================================
--- /lib/driver.js      Tue May 29 15:49:30 2012
+++ /lib/driver.js      Thu May 31 15:55:32 2012
@@ -76,6 +76,16 @@
 function fixQuotes(x) {
   return x.replace(/\'/img, '\'\'');
 }
+
+function encodeParam(x) {
+  if((typeof x == 'number') || (typeof x == 'boolean')) {
+    return x.toString();
+  } else if(x instanceof Date) {
+    return x.getTime().toString();
+  } else {
+    return quote(fixQuotes(stringify(x)));
+  }
+}

 /**
* binds arguments to a query. e.g: bind('select ?, ? from MyCf where key=?', ['arg0', 'arg1', 'arg2']);
@@ -99,7 +109,7 @@
       if (args[a] === null) {
         return nullBindError;
       }
-      str += quote(fixQuotes(stringify(args[a++])));
+      str += encodeParam(args[a++]);
       q += 1;
     } else {
       str += query.substr(oldq);
=======================================
--- /test/test_driver.js        Tue May 29 15:17:16 2012
+++ /test/test_driver.js        Thu May 31 15:55:32 2012
@@ -117,6 +117,8 @@
var cfInt = new CfDef({keyspace: ksName, name: 'CfInt', column_type: 'Standard', comparator_type: 'IntegerType', default_validation_class: 'IntegerType', key_validation_class: 'IntegerType'}); var cfUtf8 = new CfDef({keyspace: ksName, name: 'CfUtf8', column_type: 'Standard', comparator_type: 'UTF8Type', default_validation_class: 'UTF8Type', key_validation_class: 'UTF8Type'}); var cfBytes = new CfDef({keyspace: ksName, name: 'CfBytes', column_type: 'Standard', comparator_type: 'BytesType', default_validation_class: 'BytesType', key_validation_class: 'BytesType'}); + var cfBoolean = new CfDef({keyspace: ksName, name: 'CfBoolean', column_type: 'Standard', comparator_type: 'BooleanType', default_validation_class: 'BooleanType', key_validation_class: 'BooleanType'}); + var cfDate = new CfDef({keyspace: ksName, name: 'CfDate', column_type: 'Standard', comparator_type: 'DateType', default_validation_class: 'DateType', key_validation_class: 'DateType'}); var cfUuid = new CfDef({keyspace: ksName, name: 'CfUuid', column_type: 'Standard', comparator_type: 'TimeUUIDType', default_validation_class: 'TimeUUIDType', key_validation_class: 'TimeUUIDType'}); var cfUgly = new CfDef({keyspace: ksName, name: 'CfUgly', column_type: 'Standard', comparator_type: 'UTF8Type', default_validation_class: 'LongType', key_validation_class: 'IntegerType',
@@ -127,7 +129,7 @@
                               ]});
var cfCounter = new CfDef({keyspace: ksName, name: 'CfCounter', column_type: 'Standard', comparator_type: 'AsciiType', default_validation_class: 'CounterColumnType', key_validation_class: 'AsciiType'}); var super1 = new CfDef({keyspace: ksName, name: 'Super1', column_type: 'Super', comparator_type: 'UTF8Type', subcomparator_type: 'UTF8Type'}); - var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfUuid, cfUgly, cfCounter]}); + var keyspace1 = new KsDef({name: ksName, strategy_class: 'org.apache.cassandra.locator.SimpleStrategy', strategy_options: {'replication_factor': '1'}, cf_defs: [standard1, super1, cfInt, cfUtf8, cfLong, cfBytes, cfBoolean, cfDate, cfUuid, cfUgly, cfCounter]});
       sys.addKeyspace(keyspace1, function(addErr) {
         console.log(addErr);
         close();
@@ -382,20 +384,20 @@
       con.connectionInfo.use_bigints = false;
       assert.strictEqual(con.connectionInfo.use_bigints, false);

-      var updParms = [1,2,99];
+      var updParms = [1,-2,9999999999];
con.execute('update CfLong set ?=? where key=?', updParms, function(updErr) {
         if (updErr) {
           con.close();
           assert.ok(false);
           test.finish();
         } else {
- con.execute('select ? from CfLong where key=?', [1, 99], function(selErr, rows) { + con.execute('select ? from CfLong where key=?', [1, 9999999999], function(selErr, rows) {
             con.close();
             assert.strictEqual(rows.rowCount(), 1);
             var row = rows[0];
             assert.strictEqual(1, row.colCount());
             assert.strictEqual(1, row.cols[0].name);
-            assert.strictEqual(2, row.cols[0].value);
+            assert.strictEqual(-2, row.cols[0].value);
             test.finish();
           });
         }
@@ -462,6 +464,57 @@
   });
 };

+exports.testBoolean = function(test, assert) {
+  connect(function(err, con) {
+    assert.ifError(err);
+    var key = 'binarytest';
+    var booleanParams = [true, false, true]
+ con.execute('update CfBoolean set ?=? where key=?', booleanParams, function(updErr) {
+      if (updErr) {
+        con.close();
+        assert.ok(false);
+        test.finish();
+      } else {
+ con.execute('select ? from CfBoolean where key=?', [true, true], function(selErr, rows) {
+          con.close();
+          assert.strictEqual(rows.rowCount(), 1);
+          var row = rows[0];
+          assert.strictEqual(row.key, true);
+          assert.strictEqual(row.cols[0].name, true);
+          assert.strictEqual(row.cols[0].value, false);
+          test.finish();
+        });
+      }
+    });
+  });
+};
+
+exports.testDate = function(test, assert) {
+  connect(function(err, con) {
+    assert.ifError(err);
+    var key = 'binarytest';
+      var now = new Date();
+ var dateParams = [now, now.getTime(), new Date(2021, 11, 11, 11, 11, 11, 111) ] + con.execute('update CfDate set ?=? where key=?', dateParams, function(updErr) {
+      if (updErr) {
+        con.close();
+        assert.ok(false);
+        test.finish();
+      } else {
+ con.execute('select ? from CfDate where key=?', [now, dateParams[2]], function(selErr, rows) {
+          con.close();
+          assert.strictEqual(rows.rowCount(), 1);
+          var row = rows[0];
+          assert.strictEqual(row.key.getTime(), dateParams[2].getTime());
+          assert.strictEqual(row.cols[0].name.getTime(), now.getTime());
+          assert.strictEqual(row.cols[0].value.getTime(), now.getTime());
+          test.finish();
+        });
+      }
+    });
+  });
+};
+
 exports.testLong = function(test, assert) {
   connect(function(err, con) {
     if (err) {

==============================================================================
Revision: c823935d27bd
Author:   Tomaz Muraus <k...@k5-storitve.net>
Date:     Thu May 31 15:57:03 2012
Log:      Update CHANGES
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=c823935d27bd

Modified:
 /CHANGES

=======================================
--- /CHANGES    Thu May 31 11:23:36 2012
+++ /CHANGES    Thu May 31 15:57:03 2012
@@ -1,3 +1,8 @@
+Changes with cassandra-client in deveploment:
+
+- Improve serialization and deserialization support for the following types: Number, Date, Boolean.
+  [Dan Foody]
+
 Changes with cassandra-client 0.9.2:

 - Fix a race condition when pooled connections are closed.

==============================================================================
Revision: 031256c57dec
Author:   Gary Dusbabek <gdusba...@gmail.com>
Date:     Fri Jun  1 08:38:00 2012
Log:      bump version to 0.9.3

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=031256c57dec

Modified:
 /CHANGES
 /package.json

=======================================
--- /CHANGES    Thu May 31 15:57:03 2012
+++ /CHANGES    Fri Jun  1 08:38:00 2012
@@ -1,4 +1,4 @@
-Changes with cassandra-client in deveploment:
+Changes with cassandra-client in 0.9.3:

- Improve serialization and deserialization support for the following types: Number, Date, Boolean.
   [Dan Foody]
=======================================
--- /package.json       Thu May 31 11:23:36 2012
+++ /package.json       Fri Jun  1 08:38:00 2012
@@ -9,7 +9,7 @@
   ],
   "name": "cassandra-client",
   "description": "Node.js CQL driver for Apache Cassandra",
-  "version": "0.9.2",
+  "version": "0.9.3",
   "homepage": "http://code.google.com/a/apache-extras.org/p/cassandra-node/";,
   "repository": {
     "type": "git",

Reply via email to