66### Class ** ClickHouseAPI**
77Class ** ClickHouseAPI** contains simple http/https connector for ClickHouse server
88and 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**
3945Class ** ClickHouseFunctions** based on ClickHouseQuery and ClickHouseAPI and
0 commit comments