Awesome ClickHouseGolang

uptrace/go-clickhouse

⭐ 284 Go repository created 2022-01-23

The project "uptrace/go-clickhouse" is a Go client library designed specifically for interacting with the ClickHouse database server using its native protocol. It requires Go version 1.18 or higher to leverage generics, providing an efficient and modern API that is compatible with the standard database/sql interface but is not a database/sql driver itself. The client supports ClickHouse's column-oriented design, enabling efficient data operations. Key features include native protocol support, a Bun-like query builder for constructing SQL queries, and the ability to select data into various Go data structures such as scalars, structs, maps, and slices. It supports ClickHouse-specific data types like Date, DateTime, DateTime64, arrays (including nested arrays), enums, LowCardinality strings, and nullable types (except nullable arrays). The client also offers migration support and integrates with OpenTelemetry for monitoring and performance tracking. The project is actively used in production environments, notably by Uptrace, and provides comprehensive documentation, examples, and community support through discussions and chat. Benchmark tests demonstrate that this client performs faster in both read and write operations compared to other Go ClickHouse clients. Installation is straightforward via the Go package manager, and the repository includes example code illustrating basic usage such as connecting to the database, executing queries, inserting data, and retrieving results. The project also links to related tools like the Bun ORM for other databases and a Go HTTP router. Overall, this project offers a robust, high-performance, and feature-rich Go client for ClickHouse, making it suitable for developers looking to integrate ClickHouse into their Go applications with modern language features and efficient database interaction.

https://github.com/uptrace/go-clickhouse

arraybenchmarkingbun-like-query-builderclickhousedatabasedatabase/sql-compatibledatetimedocumentationenumexamplegogo-1.18+go-clientgolanglowcardinalitymigrationsnative-protocolnullableopentelemetryperformanceuptrace

Also in Golang

ClickHouse/clickhouse-go

clickhouse-go is a Golang SQL database client providing a native and database/sql interface for efficient and feature-rich interaction with ClickHouse.

mailru/go-clickhouse

A Golang SQL database driver for Yandex ClickHouse using the official HTTP interface, supporting extensive ClickHouse features and integration with tracing tools.

ClickHouse/ch-go

ch-go is a low-level Go client for ClickHouse designed for high-performance data block streaming with minimal overhead and direct protocol implementation.

roistat/go-clickhouse

A Golang connector for Yandex ClickHouse enabling efficient querying, data insertion, and cluster management for large-scale data processing.

vahid-sohrabloo/chconn

chconn is a high-performance, low-level Go driver for ClickHouse that supports all ClickHouse data types, batch operations, TLS, and compression protocols, optimized for speed and efficiency.

chdb-io/chdb-go

chdb-go provides Go bindings and a CLI for chDB, an in-process SQL OLAP engine powered by ClickHouse, enabling SQL query execution and database management within Go applications.