<commit_before>gocql
=====

Package gocql implements a fast and robust Cassandra client for the
Go programming language.

**Attention:** This package is currently actively developed and the API may
change in the future. The old "datbase/sql" based package is now called
[gocqldriver](https://github.com/tux21b/gocqldriver) and is no longer
maintained.

Installation
------------

    go get tux21b.org/v1/gocql


Features
--------

* modern Cassandra client for Cassandra 1.2 and 2.0
* automatic type conversations between Cassandra and Go
  * support for all common types including sets, lists and maps
  * custom types can implement a `Marshaler` and `Unmarshaler` interface
  * strict type conversations without any loss of precision
  * built-In support for UUIDs (version 1 and 4)
* support for logged, unlogged and counter batches
* cluster management
  * automatic reconnect on connection failures with exponential falloff
  * round robin distribution of queries to different hosts
  * round robin distribution of queries to different connections on a host
  * each connection can execute up to 128 concurrent queries
* iteration over paged results with configurable page size
* optional frame compression (using snappy)
* automatic query preparation

Example
-------

```go
package main

import (
	"fmt"
	"log"

	"tux21b.org/v1/gocql"
	"tux21b.org/v1/gocql/uuid"
)

func main() {
	// connect to the cluster
	cluster := gocql.NewCluster("192.168.1.1", "192.168.1.2", "192.168.1.3")
	cluster.Keyspace = "example"<commit_msg>added query tracing to the README<commit_after>gocql
=====

Package gocql implements a fast and robust Cassandra client for the
Go programming language.

**Attention:** This package is currently actively developed and the API may
change in the future. The old "datbase/sql" based package is now called
[gocqldriver](https://github.com/tux21b/gocqldriver) and is no longer
maintained.

Installation
------------

    go get tux21b.org/v1/gocql


Features
--------

* modern Cassandra client for Cassandra 1.2 and 2.0
* automatic type conversations between Cassandra and Go
  * support for all common types including sets, lists and maps
  * custom types can implement a `Marshaler` and `Unmarshaler` interface
  * strict type conversations without any loss of precision
  * built-In support for UUIDs (version 1 and 4)
* support for logged, unlogged and counter batches
* cluster management
  * automatic reconnect on connection failures with exponential falloff
  * round robin distribution of queries to different hosts
  * round robin distribution of queries to different connections on a host
  * each connection can execute up to 128 concurrent queries
* iteration over paged results with configurable page size
* optional frame compression (using snappy)
* automatic query preparation
* support for query tracing

Example
-------

```go
package main

import (
	"fmt"
	"log"

	"tux21b.org/v1/gocql"
	"tux21b.org/v1/gocql/uuid"
)

func main() {
	// connect to the cluster
	cluster := gocql.NewCluster("192.168.1.1", "192.168.1.2", "192.168.1.3")
	cluster.Keyspace = "example"
{'fraction_non_alphanumeric': 0.08912483912483912, 'fraction_numerical': 0.028314028314028315, 'mean_word_length': 3.990369181380417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5052931', 'n_tokens_mistral': 951, 'n_tokens_neox': 884, 'n_words': 370}