Skip to content

Commit a54f876

Browse files
committed
0.17.11
1 parent 2e19bf6 commit a54f876

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,57 @@ class my
512512

513513
```
514514

515+
### HTTPS
516+
517+
```php
518+
$db = new ClickHouseDB\Client($config);
519+
$db->settings()->https();
520+
```
521+
522+
523+
### ReadOnly ClickHouse user
524+
525+
```php
526+
$config = [
527+
'host' => '192.168.1.20',
528+
'port' => '8123',
529+
'username' => 'ro',
530+
'password' => 'ro',
531+
'readonly' => true
532+
];
533+
```
534+
535+
536+
### Direct write to file
537+
538+
Send result from clickhouse, without parse json.
539+
540+
```php
541+
$WriteToFile=new ClickHouseDB\WriteToFile('/tmp/_1_select.csv');
542+
$db->select('select * from summing_url_views',[],null,$WriteToFile);
543+
// or
544+
$db->selectAsync('select * from summing_url_views limit 4',[],null,new ClickHouseDB\WriteToFile('/tmp/_3_select.tab',true,'TabSeparatedWithNames'));
545+
$db->selectAsync('select * from summing_url_views limit 4',[],null,new ClickHouseDB\WriteToFile('/tmp/_4_select.tab',true,'TabSeparated'));
546+
$statement=$db->selectAsync('select * from summing_url_views limit 54',[],null,new ClickHouseDB\WriteToFile('/tmp/_5_select.csv',true,ClickHouseDB\WriteToFile::FORMAT_CSV));
547+
```
548+
549+
### insert Assoc Bulk
550+
551+
```php
552+
$oneRow = [
553+
'one' => 1,
554+
'two' => 2,
555+
'thr' => 3,
556+
];
557+
$failRow = [
558+
'two' => 2,
559+
'one' => 1,
560+
'thr' => 3,
561+
];
562+
563+
$db->insertAssocBulk([$oneRow, $oneRow, $failRow])
564+
```
565+
515566
### Debug & Verbose
516567

517568
```php
@@ -539,6 +590,10 @@ MIT
539590
ChangeLog
540591
---------
541592

593+
### 2017-11-22
594+
595+
- Add insertAssocBulk
596+
542597
### 2017-08-25
543598

544599
- Fix tablesSize(), use database filter

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "smi2/phpclickhouse",
33
"type": "library",
4-
"version" : "0.17.08",
4+
"version" : "0.17.11",
55
"description": "php ClickHouse client library",
66
"keywords": ["clickhouse", "driver", "client", "curl", "http", "HTTP client"],
77
"homepage": "https://github.com/smi2/phpClickHouse",

0 commit comments

Comments
 (0)