@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @var array |
| 23 | 23 | */ |
| 24 | - private $types = [ //! arrays |
|
| 24 | + private $types = [//! arrays |
|
| 25 | 25 | 'Numbers' => ["smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1, |
| 26 | 26 | "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20], |
| 27 | 27 | 'Date and time' => ["date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0], |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | private $editFunctions = [[ |
| 71 | 71 | "char" => "md5", |
| 72 | 72 | "date|time" => "now", |
| 73 | - ],[ |
|
| 73 | + ], [ |
|
| 74 | 74 | // $this->numberRegex() => "+/-", |
| 75 | 75 | "date|time" => "+ interval/- interval", //! escape |
| 76 | 76 | "char|text" => "||", |
@@ -18,9 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | protected function limitToOne(string $table, string $query, string $where) |
| 20 | 20 | { |
| 21 | - return (preg_match('~^INTO~', $query) ? $this->driver->limit($query, $where, 1, 0) : |
|
| 22 | - " $query" . ($this->driver->isView($this->driver->tableStatusOrName($table)) ? $where : |
|
| 23 | - " WHERE ctid = (SELECT ctid FROM " . $this->driver->table($table) . $where . ' LIMIT 1)')); |
|
| 21 | + return (preg_match('~^INTO~', $query) ? $this->driver->limit($query, $where, 1, 0) : " $query" . ($this->driver->isView($this->driver->tableStatusOrName($table)) ? $where : " WHERE ctid = (SELECT ctid FROM " . $this->driver->table($table) . $where . ' LIMIT 1)')); |
|
| 24 | 22 | } |
| 25 | 23 | |
| 26 | 24 | /** |
@@ -277,7 +277,7 @@ |
||
| 277 | 277 | */ |
| 278 | 278 | public function truncateTables(array $tables) |
| 279 | 279 | { |
| 280 | - $this->driver->execute('TRUNCATE ' . implode(', ', array_map(function ($table) { |
|
| 280 | + $this->driver->execute('TRUNCATE ' . implode(', ', array_map(function($table) { |
|
| 281 | 281 | return $this->driver->table($table); |
| 282 | 282 | }, $tables))); |
| 283 | 283 | return true; |