[Announcement] DataStax Node.js driver v2.2.2 released

432 views
Skip to first unread message

Jorge Bay Gondra

unread,
Oct 14, 2015, 11:21:35 AM10/14/15
to DataStax Node.js Driver for Apache Cassandra Mailing List
Hi,
We've just released version 2.2.2 of the Node.js driver for Apache Cassandra
The release includes 3 bug fixes and 1 improvement.

Bug fixes

  • NODEJS-160 - Error setting routing keys before query execution
  • NODEJS-175 - Select from table after a new field is added to a UDT can result in callback never fired
  • NODEJS-185 - Metadata fetch of table with ColumnToCollectionType fails

Improvement

  • NODEJS-187 - Expose Metadata prototype to be available for promisification.


Thanks,
Jorge

Ryan McDonald

unread,
Oct 14, 2015, 6:41:40 PM10/14/15
to DataStax Node.js Driver for Apache Cassandra Mailing List
This update seems to have broken compatibility with Cassandra 2.0. After updating, any commands I execute with prepare: true result in an error. When using any Cassandra 2.1 or 2.2 versions, it works.

Error: Named parameters for simple statements are not supported, use prepare flag

    at ArgumentError.DriverError (.../node_modules/cassandra-driver/lib/errors.js:10:19)

    at new ArgumentError (.../node_modules/cassandra-driver/lib/errors.js:84:24)

    at Client._setQueryOptions (.../node_modules/cassandra-driver/lib/client.js:817:21)

    at settingOptions (.../node_modules/cassandra-driver/lib/client.js:506:12)

    at fn (.../node_modules/cassandra-driver/node_modules/async/lib/async.js:638:34)

    at Immediate._onImmediate (.../node_modules/cassandra-driver/node_modules/async/lib/async.js:554:34)

    at processImmediate [as _immediateCallback] (timers.js:371:17)


 Thanks,
 Ryan

Jorge Bay Gondra

unread,
Oct 15, 2015, 4:02:11 AM10/15/15
to DataStax Node.js Driver for Apache Cassandra Mailing List
Hi Ryan,
We have several integration tests to cover prepared statements and are all passing against C* 2.0. 
Also, looking at the code, it looks like that error will only be thrown if the prepare flag is false.
Could it be that you are not using parameters in your query but providing options?
If that is the case, you should define the parameters in your parameters:

//null or an empty array would do
client.execute(query, [], options, callback);

//this will fail!
client.execute(query, options, callback);

As the first optional parameter takes precedence over the second.

If that is not the case, could you provide more information or a way to reproduce?

Thanks,
Jorge
Reply all
Reply to author
Forward
0 new messages