@@ -42,7 +42,7 @@ |
||
42 | 42 | if ($name == '') { |
43 | 43 | continue; |
44 | 44 | } |
45 | - $columns = implode(", ", array_map(function ($key) { |
|
45 | + $columns = implode(", ", array_map(function($key) { |
|
46 | 46 | return $this->escapeId($key); |
47 | 47 | }, $index->columns)); |
48 | 48 | $query .= ";\n\n" . $this->sqlForCreateIndex($table, $index->type, $name, "($columns)"); |
@@ -15,8 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | return preg_match('~^INTO~', $query) || |
17 | 17 | $this->driver->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 |
@@ -123,7 +123,7 @@ |
||
123 | 123 | foreach (array_reverse($alter) as $index) { |
124 | 124 | // Can't alter primary keys |
125 | 125 | if ($index->type !== 'PRIMARY') { |
126 | - $queries[] = $this->driver->sqlForCreateIndex($table, $index->type, |
|
126 | + $queries[] = $this->driver->sqlForCreateIndex($table, $index->type, |
|
127 | 127 | $index->name, '(' . implode(', ', $index->columns) . ')'); |
128 | 128 | } |
129 | 129 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $clauses = []; |
53 | 53 | foreach ($tableAttrs->fields as $field) { |
54 | 54 | if ($field[1]) { |
55 | - $clauses[] = ($field[0] != '' ? $field[1] : 'ADD ' . implode($field[1])); |
|
55 | + $clauses[] = ($field[0] != '' ? $field[1] : 'ADD ' . implode($field[1])); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | return $clauses; |
@@ -49,10 +49,10 @@ |
||
49 | 49 | $directory = $this->directory($this->driver->options()); |
50 | 50 | $iterator = new DirectoryIterator($directory); |
51 | 51 | // Iterate on dir content |
52 | - foreach($iterator as $file) |
|
52 | + foreach ($iterator as $file) |
|
53 | 53 | { |
54 | 54 | // Skip everything except Sqlite files |
55 | - if(!$file->isFile() || !$this->validateName($filename = $file->getFilename())) |
|
55 | + if (!$file->isFile() || !$this->validateName($filename = $file->getFilename())) |
|
56 | 56 | { |
57 | 57 | continue; |
58 | 58 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | // Init config |
19 | 19 | $this->config->jush = 'sqlite'; |
20 | 20 | $this->config->drivers = ["SQLite3", "PDO_SQLite"]; |
21 | - $this->config->setTypes([ //! arrays |
|
21 | + $this->config->setTypes([//! arrays |
|
22 | 22 | 'Numbers' => ["integer" => 0, "real" => 0, "numeric" => 0], |
23 | 23 | 'Strings' => ["text" => 0], |
24 | 24 | 'Binary' => ["blob" => 0], |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->config->grouping = ["avg", "count", "count distinct", "group_concat", "max", "min", "sum"]; |
31 | 31 | $this->config->editFunctions = [[ |
32 | 32 | // "text" => "date('now')/time('now')/datetime('now')", |
33 | - ],[ |
|
33 | + ], [ |
|
34 | 34 | "integer|real|numeric" => "+/-", |
35 | 35 | // "text" => "date/time/datetime", |
36 | 36 | "text" => "||", |