Skip to content

SevaCode/PhpClickHouseClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-dev"
}

About

PHP Client for ClickHouse HTTP interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages