diff --git a/src/Integrations/Laravel/Connection.php b/src/Integrations/Laravel/Connection.php index 6a8cf38..898d106 100644 --- a/src/Integrations/Laravel/Connection.php +++ b/src/Integrations/Laravel/Connection.php @@ -17,6 +17,8 @@ class Connection extends \Illuminate\Database\Connection { + /** @var array * */ + protected $setting = []; /** * Clickhouse connection handler. * @@ -428,13 +430,27 @@ public function insert($query, $bindings = []) { $startTime = microtime(true); - $result = $this->getClient()->writeOne($query); + $result = $this->getClient()->writeOne($query, [], this->setting); $this->logQuery($query, $bindings, microtime(true) - $startTime); return $result; } + /** + *Set Clickhouse setting. + * + * @param array $setting + * + * @return Connection + */ + public function setSetting(array $setting) + { + $this->setting = $setting; + + return $this; + } + /** * Run async insert queries from local CSV or TSV files. *