Skip to content

Commit 550e3ec

Browse files
committed
async-request and compression supported
1 parent 733a3db commit 550e3ec

File tree

10 files changed

+2675
-453
lines changed

10 files changed

+2675
-453
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sudo: required
55
# list any PHP version you want to test against
66
php:
77
# using major version aliases
8-
- 5.4
8+
# - 5.4 removed
99
- 5.5
1010
- 5.6
1111
- 7.0

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
### Class **ClickHouseAPI**
77
Class **ClickHouseAPI** contains simple http/https connector for ClickHouse server
88
and have not dependencies (may be used independently, file src/ClichHouseAPI.php).
9-
#### http/https connector functions:
10-
* **setServerUrl**($url) - set ClickHouse server parameters by url (host, port, etc.)
9+
#### API simple requests functions:
10+
* **query**($sql [,$post_data]) - object-oriented style SQL-query (return $this, throw exceptions)
1111
* **getQuery**($h_query [, $sess]) - send GET request
1212
* **postQuery**($h_query, $post_data [, $sess]) - send POST request
13-
* **query**($sql [,$post_data]) - object-oriented style SQL-query (return $this, throw exceptions)
14-
#### Special functions
13+
#### Async (parallel) requests:
14+
* Set **toSlot**(name) before any request, and the request will be launched asynchronously.
15+
* **toSlot**("name")->**query**($sql) - start async-$sql-query, results will be written to slot "name"
16+
* Get results from this slot may at any time later:
17+
* **slotResults**("name") - get results from slot "name".
18+
#### Server-state functions:
19+
* **setServerUrl**($url) - set ClickHouse server parameters by url (host, port, etc.)
1520
* **getVersion**() - return version of ClickHouse server (side effect - detect server features)
1621
* **isSupported**(feature-name) - true or false depending on the server support features.
17-
##### If isSupported('session_id'):
22+
##### Sessions:
1823
* **getSession**() - get current session_id from options
1924
* **setSession**([$sess]) - set session_id or generate new session_id and set it
2025
##### Options:
@@ -34,6 +39,7 @@ send queries to ClickHouse server and parsing answering data.
3439
* **queryKeyValues**(see descr.) - for queries returning 2 columns, first means as key, second as value
3540
* **queryInsertArray**($table, $fields_names, $fields_set) - insert data into table from array
3641
* **queryInsertFile**($table, $file, $structure) - insert data from file into table
42+
* **queryInsertGzip**($table, $file, $format [, $fields]) - insert data from file, using gzip when sending
3743

3844
### Class **ClickHouseFunctions**
3945
Class **ClickHouseFunctions** based on ClickHouseQuery and ClickHouseAPI and

0 commit comments

Comments
 (0)