@@ -10,24 +10,27 @@ and have not dependencies (may be used independently, file src/ClichHouseAPI.php
1010* ** setServerUrl** ($url) - set ClickHouse server parameters by url (host, port, etc.)
1111* ** getQuery** ($h_query [ , $sess] ) - send GET request
1212* ** postQuery** ($h_query, $post_data [ , $sess] ) - send POST request
13- ##### Sessions:
13+ #### Special functions
14+ * ** getVersion** () - return version of ClickHouse server (side effect - detect server features)
15+ * ** isSupported** (feature-name) - true or false depending on the server support features.
16+ ##### If isSupported('session_id'):
1417* ** getSession** () - get current session_id from options
1518* ** setSession** ([ $sess] ) - set session_id or generate new session_id and set it
1619##### Options:
17- * ** setOption** ($key, $value) - set http-option for requests
18- * ** getOption** ($key) - get http-option value
20+ * ** setOption** ($key, $value) - set http-option for all next requests
21+ * ** getOption** ($key) - get current http-option value
1922* ** delOption** ($key) - delete http-option (same ->setOption($key, null)
2023
2124### Class ** ClickHouseQuery**
2225Class ** ClickHouseQuery** contains wrapper for ClickHouseAPI and allow to easily
2326send queries to ClickHouse server and parsing answering data.
2427
2528#### Main query-functions for use:
26- * ** queryTrue ** ($sql, [ post] ) - Return false only if error, otherwise return true or data
27- * ** queryFalse ** ($sql, [ post] )- Return false only if NOT error, otherwise string with error .
28- * ** queryValue** ($sql, [ post] ) - Send query and receive data in one string (false if error)
29- * ** queryArray** ($sql) - for queries returning multi-rows data
30- * ** queryKeyValues** (see descr.) - for queries returning 2 columns key => value
29+ * ** queryFalse ** ($sql, [ post] )- for queries that should not return anything. False if ok, or error string.
30+ * ** queryTrue ** ($sql, [ post] ) - return false only if error, otherwise return true or response data .
31+ * ** queryValue** ($sql, [ post] ) - send any query and receive all data in one string (false if error)
32+ * ** queryArray** ($sql) - for queries returning structured data (usually one or more table rows)
33+ * ** queryKeyValues** (see descr.) - for queries returning 2 columns, first means as key, second as value
3134* ** queryInsertArray** ($table, $fields_names, $fields_set) - insert data into table from array
3235* ** queryInsertFile** ($table, $file, $structure) - insert data from file into table
3336
@@ -48,7 +51,6 @@ contains functions for simple operations with ClickHouse.
4851* ** getDatabasesList** () - returns array contained names of existing Databases
4952* ** setCurrentDatabase** ($db [ , $sess] ) - set current database by 'USE db' request
5053* ** getCurrentDatabase** ([ $sess] ) - return results of 'SELECT currentDatabase()'
51- * ** getVersion** () - return version of ClickHouse server
5254* ** getUptime** () - return server uptime in seconds
5355* ** getSystemSettings** () - get information from system.settings as array [ name=>value]
5456
0 commit comments