GoCQL github.com/gocql

Under Development: The GoCQL package is currently actively developed and the API may change in the future.


Cluster Management

GoCQL automatically discovers all data centers, racks and hosts in your cluster, manages a pool of connections to them and distributes queries in a reasonable and efficient way.

Type Conversion

Automatic and safe type conversion between Cassandra and Go without any loss of precision. Basic types, collections and UUIDs are supported by default and custom types can implement their own marshaling logic.

Synchronous and Concurrent

Synchronous API with an asynchronous and concurrent back-end. Each connection can handle up to 128 concurrent queries and may receive server side push events at any time.

Failover Management


Result Paging

Iterate over large results sets and let GoCQL fetch one page after another. The next page is automatically pre-fetched in the background once the iterator has passed a certain threshold.

Atomic Batches

Execute a batch of related updates in a single query. GoCQL supports logged, unlogged and counter batches.

Query Tracing

Trace queries to obtain a detailed output of all events that happened during the query execution from Cassandra. The output might help to identify bugs and performance bottlenecks in your application.

Frame Compression

Speed up and reduce the network traffic by compressing the frames that are sent to Cassandra. Snappy, a compression algorithm that aims for very high speeds and reasonable compression, is enabled by default.

Multiple Cassandra Versions

GoCQL supports multiple Cassandra version. Currently Cassandra 1.2 and Cassandra 2.0 are fully supported.

Thoroughly Tested


BSD License

Completely open source. Browse the source on GitHub and start contributing today.