@@ -142,8 +142,8 @@ |
||
| 142 | 142 | ' (' . implode(', ', $originals) . ') SELECT ' . implode( |
| 143 | 143 | ', ', |
| 144 | 144 | array_map(function ($key) { |
| 145 | - return $this->driver->escapeId($key); |
|
| 146 | - }, array_keys($originals)) |
|
| 145 | + return $this->driver->escapeId($key); |
|
| 146 | + }, array_keys($originals)) |
|
| 147 | 147 | ) . ' FROM ' . $this->driver->table($table))) { |
| 148 | 148 | return false; |
| 149 | 149 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | if ($originals && !$this->driver->execute('INSERT INTO ' . $this->driver->table($tempName) . |
| 142 | 142 | ' (' . implode(', ', $originals) . ') SELECT ' . implode( |
| 143 | 143 | ', ', |
| 144 | - array_map(function ($key) { |
|
| 144 | + array_map(function($key) { |
|
| 145 | 145 | return $this->driver->escapeId($key); |
| 146 | 146 | }, array_keys($originals)) |
| 147 | 147 | ) . ' FROM ' . $this->driver->table($table))) { |
@@ -153,8 +153,7 @@ discard block |
||
| 153 | 153 | $triggers[] = 'CREATE TRIGGER ' . $this->driver->escapeId($trigger_name) . ' ' . |
| 154 | 154 | implode(' ', $timing_event) . ' ON ' . $this->driver->table($name) . "\n$trigger[Statement]"; |
| 155 | 155 | } |
| 156 | - $autoIncrement = $autoIncrement ? 0 : |
|
| 157 | - $this->connection->result('SELECT seq FROM sqlite_sequence WHERE name = ' . |
|
| 156 | + $autoIncrement = $autoIncrement ? 0 : $this->connection->result('SELECT seq FROM sqlite_sequence WHERE name = ' . |
|
| 158 | 157 | $this->driver->quote($table)); // if $autoIncrement is set then it will be updated later |
| 159 | 158 | // drop before creating indexes and triggers to allow using old names |
| 160 | 159 | if (!$this->driver->execute('DROP TABLE ' . $this->driver->table($table)) || |
@@ -188,8 +187,7 @@ discard block |
||
| 188 | 187 | } |
| 189 | 188 | foreach (array_reverse($alter) as $val) { |
| 190 | 189 | if (!$this->driver->execute($val[2] == 'DROP' ? |
| 191 | - 'DROP INDEX ' . $this->driver->escapeId($val[1]) : |
|
| 192 | - $this->driver->sqlForCreateIndex($table, $val[0], $val[1], '(' . implode(', ', $val[2]) . ')') |
|
| 190 | + 'DROP INDEX ' . $this->driver->escapeId($val[1]) : $this->driver->sqlForCreateIndex($table, $val[0], $val[1], '(' . implode(', ', $val[2]) . ')') |
|
| 193 | 191 | )) { |
| 194 | 192 | return false; |
| 195 | 193 | } |
@@ -15,8 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | return preg_match('~^INTO~', $query) || |
| 17 | 17 | $this->connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? |
| 18 | - $this->driver->limit($query, $where, 1, 0) : |
|
| 19 | - //! use primary key in tables with WITHOUT rowid |
|
| 18 | + $this->driver->limit($query, $where, 1, 0) : //! use primary key in tables with WITHOUT rowid |
|
| 20 | 19 | " $query WHERE rowid = (SELECT rowid FROM " . $this->driver->table($table) . $where . ' LIMIT 1)'; |
| 21 | 20 | } |
| 22 | 21 | |