@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | */ |
| 525 | 525 | public function insert($table, $values, $columns = []) |
| 526 | 526 | { |
| 527 | - if (stripos($table,'`')===false && stripos($table,'.')===false) { |
|
| 527 | + if (stripos($table, '`') === false && stripos($table, '.') === false) { |
|
| 528 | 528 | $table = '`' . $table . "`"; //quote table name for dot names |
| 529 | 529 | } |
| 530 | 530 | $sql = 'INSERT INTO ' . $table; |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * @return mixed |
| 594 | 594 | * @throws Exception\TransportException |
| 595 | 595 | */ |
| 596 | - public function insertBatchTSVFiles($table_name, $file_names, $columns_array=[]) |
|
| 596 | + public function insertBatchTSVFiles($table_name, $file_names, $columns_array = []) |
|
| 597 | 597 | { |
| 598 | 598 | return $this->insertBatchFiles($table_name, $file_names, $columns_array, 'TabSeparated'); |
| 599 | 599 | } |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | * @return array |
| 609 | 609 | * @throws Exception\TransportException |
| 610 | 610 | */ |
| 611 | - public function insertBatchFiles($table_name, $file_names, $columns_array=[], $format = "CSV") |
|
| 611 | + public function insertBatchFiles($table_name, $file_names, $columns_array = [], $format = "CSV") |
|
| 612 | 612 | { |
| 613 | 613 | if (is_string($file_names)) |
| 614 | 614 | { |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | * @param string $format ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames'] |
| 664 | 664 | * @return Transport\CurlerRequest |
| 665 | 665 | */ |
| 666 | - public function insertBatchStream($table_name, $columns_array=[], $format = "CSV") |
|
| 666 | + public function insertBatchStream($table_name, $columns_array = [], $format = "CSV") |
|
| 667 | 667 | { |
| 668 | 668 | if ($this->getCountPendingQueue() > 0) { |
| 669 | 669 | throw new QueryException('Queue must be empty, before insertBatch, need executeAsync'); |
@@ -697,12 +697,12 @@ discard block |
||
| 697 | 697 | * @return Statement |
| 698 | 698 | * @throws Exception\TransportException |
| 699 | 699 | */ |
| 700 | - public function streamWrite(Stream $stream,$sql,$bind=[]) |
|
| 700 | + public function streamWrite(Stream $stream, $sql, $bind = []) |
|
| 701 | 701 | { |
| 702 | 702 | if ($this->getCountPendingQueue() > 0) { |
| 703 | 703 | throw new QueryException('Queue must be empty, before streamWrite'); |
| 704 | 704 | } |
| 705 | - return $this->transport()->streamWrite($stream,$sql,$bind); |
|
| 705 | + return $this->transport()->streamWrite($stream, $sql, $bind); |
|
| 706 | 706 | } |
| 707 | 707 | |
| 708 | 708 | |
@@ -715,12 +715,12 @@ discard block |
||
| 715 | 715 | * @return Statement |
| 716 | 716 | * @throws Exception\TransportException |
| 717 | 717 | */ |
| 718 | - public function streamRead(Stream $streamRead,$sql,$bind=[]) |
|
| 718 | + public function streamRead(Stream $streamRead, $sql, $bind = []) |
|
| 719 | 719 | { |
| 720 | 720 | if ($this->getCountPendingQueue() > 0) { |
| 721 | 721 | throw new QueryException('Queue must be empty, before streamWrite'); |
| 722 | 722 | } |
| 723 | - return $this->transport()->streamRead($streamRead,$sql,$bind); |
|
| 723 | + return $this->transport()->streamRead($streamRead, $sql, $bind); |
|
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | /** |
@@ -923,12 +923,12 @@ discard block |
||
| 923 | 923 | * @return array |
| 924 | 924 | * @throws Exception\TransportException |
| 925 | 925 | */ |
| 926 | - public function getServerSystemSettings($like='') |
|
| 926 | + public function getServerSystemSettings($like = '') |
|
| 927 | 927 | { |
| 928 | - $l=[]; |
|
| 929 | - $list=$this->select('SELECT * FROM system.settings'.($like ? ' WHERE name LIKE :like':'' ),['like'=>'%'.$like.'%'])->rows(); |
|
| 928 | + $l = []; |
|
| 929 | + $list = $this->select('SELECT * FROM system.settings' . ($like ? ' WHERE name LIKE :like' : ''), ['like'=>'%' . $like . '%'])->rows(); |
|
| 930 | 930 | foreach ($list as $row) { |
| 931 | - if (isset($row['name'])) {$n=$row['name']; unset($row['name']) ; $l[$n]=$row;} |
|
| 931 | + if (isset($row['name'])) {$n = $row['name']; unset($row['name']); $l[$n] = $row; } |
|
| 932 | 932 | } |
| 933 | 933 | return $l; |
| 934 | 934 | } |