Installation

Prerequisites

  • Go 1.18 or higher.
  • A running ScyllaDB or Apache Cassandra instance.

Installing the Library

Add GocqlX to your project using go get:

go get github.com/scylladb/gocqlx/v3

Important: ScyllaDB Driver Compatibility

Starting with version v3.0.0, GocqlX exclusively supports the scylladb/gocql fork of the driver. You must include a replace directive in your go.mod file to ensure the correct driver is used.

Add the following lines to your go.mod:

// Use the latest version of scylladb/gocql
replace github.com/gocql/gocql => github.com/scylladb/gocql v1.16.0

Installing the CLI Tool

To install the schema generation tool schemagen:

git clone https://github.com/scylladb/gocqlx.git
cd gocqlx/cmd/schemagen/
go install .