PNixx/clickhouse-activerecord
A Ruby ActiveRecord driver enabling seamless integration and management of ClickHouse databases within Ruby on Rails applications.
This project is a modern Ruby database driver specifically designed for ClickHouse, a high-performance column-oriented database management system developed by Yandex. The driver facilitates communication with ClickHouse through its HTTP interface, which is recommended over the TCP interface by ClickHouse developers for better compatibility and stability. The driver supports a wide range of database operations including creating, dropping, and altering databases and tables, executing queries, inserting data, and managing indexes. It offers robust configuration options such as setting connection parameters, authentication, logging, and JSON parsing/serialization methods. The driver supports type casting for query results and provides methods for selecting all records, single values, or single records with type-casted results. It also supports raw SQL execution with various response formats like JSON, CSV, and RowBinary. The project includes features for using connection pools, integration with Rails and ActiveRecord, and testing with RSpec. The driver is designed to be a well-tested and maintainable alternative to older Ruby ClickHouse clients. Overall, it aims to provide a reliable, efficient, and easy-to-use interface for Ruby applications to interact with ClickHouse databases, leveraging the HTTP protocol for communication and offering extensive functionality for database management and querying.
https://github.com/shlima/click_house
A Ruby ActiveRecord driver enabling seamless integration and management of ClickHouse databases within Ruby on Rails applications.