Registry / database / gocql-gocql

gocql-gocql

JSON →
library1.7.0gogounverified

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

go get github.com/gocql/gocql
INSTALL
IMPORT
SIG · GOCQL-GOCQL
G
gocql-gocql
databasegov1.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gocql
✓ github.com/gocql/gocql

Connects to Cassandra and queries a single row.

package main import ( "fmt" "log" "github.com/gocql/gocql" ) func main() { cluster := gocql.NewCluster("127.0.0.1") session, err := cluster.CreateSession() if err != nil { log.Fatal(err) } defer session.Close() var name string if err := session.Query("SELECT name FROM users WHERE id = ?", 1).Scan(&name); err != nil { log.Fatal(err) } fmt.Println(name) }
Debug
Known issues
gotchaSslOptions is insecure by default; EnableHostVerification must be set to true if no tls.Config is provided.
fix
Set SslOptions.EnableHostVerification = true or provide a *tls.Config.
affects: *
Upgrade
Version history
1.7.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
gocql-gocql — go get gocql-gocql · libregistry