seva-code / php-click-house-client
PHP Client for ClickHouse HTTP interface
Installs: 3 761
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
- symfony/http-client: ^6.2
This package is auto-updated.
Last update: 2024-09-14 18:20:46 UTC
README
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" }