Skip to content

Commit 075ff3b

Browse files
committed
Update example to new eventloop and new clickhouse API
1 parent 8431192 commit 075ff3b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ Once [installed](#install), you can use the following code to connect to your
3434
local ClickHouse database and send some queries:
3535

3636
```php
37-
$loop = React\EventLoop\Factory::create();
38-
$client = new Clue\React\ClickHouse\Client('http://localhost:8123/', $loop);
37+
$client = new Clue\React\ClickHouse\ClickHouseClient('http://localhost:8123/');
3938

4039
$client->query('SELECT id, name FROM users')->then(function (Clue\React\ClickHouse\Result $result) {
4140
var_dump($result);
4241
}, function (Exception $e) {
4342
echo 'Error: ' . $e->getMessage() . PHP_EOL;
4443
});
45-
46-
$loop->run();
4744
```
4845

4946
## Install

0 commit comments

Comments
 (0)