From ab7f89d0cd179a4f722d1c00db2e3d3ffec2cfa9 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Wed, 25 Aug 2021 12:47:51 +0200 Subject: [PATCH] Update example to new eventloop and new clickhouse API --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5023e09..7f82dd5 100644 --- a/README.md +++ b/README.md @@ -34,16 +34,17 @@ Once [installed](#install), you can use the following code to connect to your local ClickHouse database and send some queries: ```php -$loop = React\EventLoop\Factory::create(); -$client = new Clue\React\ClickHouse\Client('http://localhost:8123/', $loop); +query('SELECT id, name FROM users')->then(function (Clue\React\ClickHouse\Result $result) { var_dump($result); }, function (Exception $e) { echo 'Error: ' . $e->getMessage() . PHP_EOL; }); - -$loop->run(); ``` ## Install