Skip to content

Commit

Permalink
0.17.11
Browse files Browse the repository at this point in the history
  • Loading branch information
isublimity committed Nov 22, 2017
1 parent 2e19bf6 commit a54f876
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,57 @@ class my

```

### HTTPS

```php
$db = new ClickHouseDB\Client($config);
$db->settings()->https();
```


### ReadOnly ClickHouse user

```php
$config = [
'host' => '192.168.1.20',
'port' => '8123',
'username' => 'ro',
'password' => 'ro',
'readonly' => true
];
```


### Direct write to file

Send result from clickhouse, without parse json.

```php
$WriteToFile=new ClickHouseDB\WriteToFile('/tmp/_1_select.csv');
$db->select('select * from summing_url_views',[],null,$WriteToFile);
// or
$db->selectAsync('select * from summing_url_views limit 4',[],null,new ClickHouseDB\WriteToFile('/tmp/_3_select.tab',true,'TabSeparatedWithNames'));
$db->selectAsync('select * from summing_url_views limit 4',[],null,new ClickHouseDB\WriteToFile('/tmp/_4_select.tab',true,'TabSeparated'));
$statement=$db->selectAsync('select * from summing_url_views limit 54',[],null,new ClickHouseDB\WriteToFile('/tmp/_5_select.csv',true,ClickHouseDB\WriteToFile::FORMAT_CSV));
```

### insert Assoc Bulk

```php
$oneRow = [
'one' => 1,
'two' => 2,
'thr' => 3,
];
$failRow = [
'two' => 2,
'one' => 1,
'thr' => 3,
];

$db->insertAssocBulk([$oneRow, $oneRow, $failRow])
```

### Debug & Verbose

```php
Expand Down Expand Up @@ -539,6 +590,10 @@ MIT
ChangeLog
---------

### 2017-11-22

- Add insertAssocBulk

### 2017-08-25

- Fix tablesSize(), use database filter
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "smi2/phpclickhouse",
"type": "library",
"version" : "0.17.08",
"version" : "0.17.11",
"description": "php ClickHouse client library",
"keywords": ["clickhouse", "driver", "client", "curl", "http", "HTTP client"],
"homepage": "https://github.com/smi2/phpClickHouse",
Expand Down

0 comments on commit a54f876

Please sign in to comment.