Gocqlx: A Productivity Toolkit for ScyllaDB in Go
Blog post from ScyllaDB
Gocqlx is an extension to the Go ScyllaDB/Apache Cassandra driver Gocql, designed to enhance developer productivity without compromising query performance. Inspired by Sqlx, Gocqlx addresses several issues present in Gocql, such as the lack of named query parameters and the complexity of scanning rows into structs. It offers builders for creating queries, support for named parameters, and simplified binding of query parameters from struct fields or maps. Additionally, Gocqlx provides convenience functions for data retrieval, significantly streamlining operations like loading rows into memory. It is optimized for speed, utilizing the Reflectx package for cached reflections, and demonstrates superior performance in benchmarks compared to raw Gocql by reusing memory for binding values. Gocqlx's design allows it to coexist with Gocql, leveraging its strengths while offering a more flexible and maintainable approach to database interactions, all under the Apache License 2.0.