File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ class Connection extends \yii\db\Connection
2424 */
2525 public $ commandClass = 'bashkarev\clickhouse\Command ' ;
2626
27+ /**
28+ * Additional options you can pass to clickhouse client constructor
29+ *
30+ * @var array
31+ */
32+ public $ clientOptions = [];
33+
2734 /**
2835 * @var Client
2936 */
@@ -55,12 +62,12 @@ public function open()
5562 if ($ this ->_client === null ) {
5663 $ config = $ this ->parseDsn ();
5764
58- $ this ->_client = new Client ([
65+ $ this ->_client = new Client (array_merge ( [
5966 'host ' => $ config ['host ' ] ?? '127.0.0.1 ' ,
6067 'port ' => $ config ['port ' ] ?? 8123 ,
6168 'username ' => $ this ->username ,
6269 'password ' => $ this ->password ,
63- ],
70+ ], $ this -> clientOptions ),
6471 array_merge ([
6572 'database ' => $ config ['database ' ] ?? 'default ' ,
6673 ], $ this ->attributes ?? [])
You can’t perform that action at this time.
0 commit comments