|
@@ -29,9 +29,9 @@ discard block |
|
|
block discarded – undo |
|
29
|
29
|
$this->selectBuilder = new \Maphper\Lib\SelectBuilder(); |
|
30
|
30
|
$this->whereBuilder = new \Maphper\Lib\Sql\WhereBuilder(); |
|
31
|
31
|
|
|
32
|
|
- $this->fields = implode(',', array_map([$this->adapter, 'quote'], (array) $this->options->read('fields'))); |
|
|
32
|
+ $this->fields = implode(',', array_map([$this->adapter, 'quote'], (array)$this->options->read('fields'))); |
|
33
|
33
|
|
|
34
|
|
- $this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort') : implode(', ', $this->primaryKey); |
|
|
34
|
+ $this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort') : implode(', ', $this->primaryKey); |
|
35
|
35
|
|
|
36
|
36
|
$this->alterDb = $this->options->getEditMode(); |
|
37
|
37
|
|
|
@@ -39,7 +39,7 @@ discard block |
|
|
block discarded – undo |
|
39
|
39
|
} |
|
40
|
40
|
|
|
41
|
41
|
private function optimizeColumns() { |
|
42
|
|
- if (self::EDIT_OPTIMISE & $this->alterDb && rand(0,500) == 1) $this->adapter->optimiseColumns($this->table); |
|
|
42
|
+ if (self::EDIT_OPTIMISE & $this->alterDb && rand(0, 500) == 1) $this->adapter->optimiseColumns($this->table); |
|
43
|
43
|
} |
|
44
|
44
|
|
|
45
|
45
|
public function getPrimaryKey() { |
|
@@ -176,7 +176,7 @@ discard block |
|
|
block discarded – undo |
|
176
|
176
|
|
|
177
|
177
|
private function updateCache($data) { |
|
178
|
178
|
$pkValue = $data->{$this->primaryKey[0]}; |
|
179
|
|
- if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object) array_merge((array)$this->cache[$pkValue], (array)$data); |
|
|
179
|
+ if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object)array_merge((array)$this->cache[$pkValue], (array)$data); |
|
180
|
180
|
else $this->cache[$pkValue] = $data; |
|
181
|
181
|
} |
|
182
|
182
|
|