Awesome ClickHousePHP

the-tinderbox/ClickhouseBuilder

⭐ 201 PHP repository created 2017-06-14

ClickhouseBuilder is a fluent query builder designed specifically for Clickhouse, a columnar database management system. It provides an intuitive and flexible interface to construct SQL queries programmatically, making it easier for developers to interact with Clickhouse databases. The project integrates seamlessly with PHP frameworks like Laravel and Lumen, enhancing their capabilities to work with Clickhouse. The builder supports a wide range of SQL operations including selecting columns, specifying aliases, subqueries, joins, and sampling. It allows complex expressions and nested queries through closures, enabling advanced query construction with ease. The builder also supports temporary tables, which is useful for handling large datasets by uploading local files to the server and using them as temporary tables in queries. This feature is particularly beneficial for filtering large sets of user IDs or other data without overloading the query. Additionally, the builder facilitates inserting data from files into Clickhouse tables, supporting asynchronous batch inserts and temporary memory tables for intermediate data processing. The query builder supports various SQL clauses such as WHERE, PREWHERE, and HAVING, with flexible syntax for conditions including closures for nested conditions and subqueries. It also offers helper functions for different types of joins, including array joins and global joins, providing comprehensive support for Clickhouse's unique SQL dialect. Overall, ClickhouseBuilder simplifies the process of building complex Clickhouse queries in PHP, making it a valuable tool for developers working with Clickhouse databases in PHP environments.

https://github.com/the-tinderbox/ClickhouseBuilder

array-joinsasynchronous-insertsclickhouseclickhouse-fluentclickhouse-wrapperclosuresdata-insertionhavingjoinslaravellumenphpprewherequery-buildersamplingsqlsubqueriestemporary-tables

Also in PHP

smi2/phpClickHouse

A PHP wrapper for ClickHouse providing asynchronous queries, bulk inserts, cluster management, and performance optimizations for efficient database interaction.

cybercog/laravel-clickhouse

Laravel ClickHouse is a package that integrates ClickHouse database client and migration support into Laravel applications, enabling efficient management of ClickHouse databases within the Laravel framework.

FriendsOfDoctrine/dbal-clickhouse

Doctrine DBAL driver for ClickHouse database enabling seamless integration with Symfony and other frameworks using Doctrine, supporting advanced database operations and custom types.