iconara / cql-rb

Cassandra CQL 3 binary protocol driver for Ruby
106 stars 31 forks source link

Tracing support for void result operations #62

Closed iconara closed 10 years ago

iconara commented 10 years ago

Previously the client returned nil for operations with void results. This is going to change, and instead they will return VoidResult objects that are API compatible with QueryResult. The only reason is to have somewhere to put the trace ID when tracing is requested.

iconara commented 10 years ago

This kind of breaks the API, this is what the docs currently say (from #execute):

Most queries have no result and return nil, but SELECT statements return an Enumerable of rows (see QueryResult).

It doesn't explicitly say what queries return nil, just that most do and that some don't. With this change some queries (like USE) probably still will return nil, so it's kind of almost in some way hopefully perhaps maybe ok to make this change and still claim to be backwards compatible. This will be released in a new minor version (v1.2), so it's at least not like it's going to fly in under the radar in a bugfix release.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling cddf5c5b3ba162d5f5b3489028ef5821d4357de2 on tracing_support_for_void into 6cc95d881c1427b05b868b682ba4c6577df9313b on master.