2 new revisions:

Revision: 8fc7149942a9
Author:   Tomaz Muraus <to...@tomaz.me>
Date:     Mon Jan  9 12:44:46 2012
Log:      Add a test for select count.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=8fc7149942a9

Revision: a220abe95114
Author:   Tomaz Muraus <to...@tomaz.me>
Date:     Mon Jan  9 13:59:12 2012
Log:      update changes, bump version.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=a220abe95114

==============================================================================
Revision: 8fc7149942a9
Author:   Tomaz Muraus <to...@tomaz.me>
Date:     Mon Jan  9 12:44:46 2012
Log:      Add a test for select count.

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

Modified:
 /test/test_driver.js

=======================================
--- /test/test_driver.js        Mon Jan  9 12:03:36 2012
+++ /test/test_driver.js        Mon Jan  9 12:44:46 2012
@@ -183,6 +183,46 @@
   });
 };

+exports.testSelectCount = function(test, assert) {
+  var con = null;
+
+  async.waterfall([
+    connect,
+
+    function executeCountQuery(_con, callback) {
+      con = _con;
+      con.execute('SELECT COUNT(*) FROM CfLong', [], function(err, rows) {
+        assert.ifError(err);
+        assert.equal(rows[0].cols[0].value, 0);
+        callback();
+      });
+    },
+
+    function insertFiveRows(callback) {
+      async.forEach([1, 2, 3, 4, 5], function(i, callback) {
+        con.execute('UPDATE CfLong SET 1=1 WHERE key=?', [i], callback);
+      }, callback);
+    },
+
+    function executeCountQuery(callback) {
+      con.execute('SELECT COUNT(*) FROM CfLong', [], function(err, rows) {
+        assert.ifError(err);
+        assert.equal(rows[0].cols[0].value, 5);
+        callback();
+      });
+    },
+  ],
+
+  function(err) {
+    if (con) {
+      con.close();
+    }
+
+    assert.ifError(err);
+    test.finish();
+  });
+};
+
 exports.testSimpleUpdate = function(test, assert) {
   connect(function(err, con) {
     if (err) {

==============================================================================
Revision: a220abe95114
Author:   Tomaz Muraus <to...@tomaz.me>
Date:     Mon Jan  9 13:59:12 2012
Log:      update changes, bump version.

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

Modified:
 /CHANGES
 /package.json

=======================================
--- /CHANGES    Mon Jan  9 10:50:19 2012
+++ /CHANGES    Mon Jan  9 13:59:12 2012
@@ -1,4 +1,4 @@
-Changes with cassandra-client in development:
+Changes with cassandra-client 0.6.2:

 - Fix scope leaks.

=======================================
--- /package.json       Mon Jan  9 10:46:41 2012
+++ /package.json       Mon Jan  9 13:59:12 2012
@@ -8,7 +8,7 @@
   ],
   "name": "cassandra-client",
   "description": "Node.js CQL driver for Apache Cassandra",
-  "version": "0.6.1",
+  "version": "0.6.2",
   "homepage": "http://code.google.com/a/apache-extras.org/p/cassandra-node/";,
   "repository": {
     "type": "git",

Reply via email to