Skip to content
PHP Client for ClickHouse HTTP interface
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md published in packagist.org Mar 14, 2019
composer.json

README.md

PhpClickHouseClient

PHP Client for ClickHouse HTTP interface

Use examples

$data = (new ChcClient())->getJsonData($query);
$client = new ChcClient();

try {
    if ($client->ping()) {
        $client->readOnly(true);
        $result = $client->getRaw($query, ChcFormat::JSONEachRow);
    } else {
        throw new Exception('ClickHouse is down.');
    }
}
catch (ChcException $e) {
    $error = $e->getMessage();
}
$latency = $client->getLastQueryLatency();

Install through Composer

"require": {
    "seva-code/php-click-house-client": "^1.2.0"
}
You can’t perform that action at this time.