|
@@ -63,17 +63,17 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
]; |
|
64
|
64
|
} |
|
65
|
65
|
|
|
66
|
|
- $sql = 'SELECT DISTINCT '.implode(', ', array_map(function ($columnDesc) { |
|
|
66
|
+ $sql = 'SELECT DISTINCT '.implode(', ', array_map(function($columnDesc) { |
|
67
|
67
|
return $this->tdbmService->getConnection()->quoteIdentifier($this->mainTable).'.'.$this->tdbmService->getConnection()->quoteIdentifier($columnDesc['column']); |
|
68
|
68
|
}, $columnDescList)).' FROM '.$this->from; |
|
69
|
69
|
|
|
70
|
|
- if (count($allFetchedTables) > 1) { |
|
|
70
|
+ if (count($allFetchedTables)>1) { |
|
71
|
71
|
list($columnDescList, $columnsList, $orderString) = $this->getColumnsList($this->mainTable, [], $this->orderBy); |
|
72
|
72
|
} |
|
73
|
73
|
|
|
74
|
74
|
// Let's compute the COUNT. |
|
75
|
75
|
$pkColumnNames = $this->schema->getTable($this->mainTable)->getPrimaryKeyColumns(); |
|
76
|
|
- $pkColumnNames = array_map(function ($pkColumn) { |
|
|
76
|
+ $pkColumnNames = array_map(function($pkColumn) { |
|
77
|
77
|
return $this->tdbmService->getConnection()->quoteIdentifier($this->mainTable).'.'.$this->tdbmService->getConnection()->quoteIdentifier($pkColumn); |
|
78
|
78
|
}, $pkColumnNames); |
|
79
|
79
|
|
|
@@ -131,7 +131,7 @@ discard block |
|
|
block discarded – undo |
|
131
|
131
|
*/ |
|
132
|
132
|
private function getParentRelationshipForeignKeys($tableName) |
|
133
|
133
|
{ |
|
134
|
|
- return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function () use ($tableName) { |
|
|
134
|
+ return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function() use ($tableName) { |
|
135
|
135
|
return $this->getParentRelationshipForeignKeysWithoutCache($tableName); |
|
136
|
136
|
}); |
|
137
|
137
|
} |
|
@@ -160,7 +160,7 @@ discard block |
|
|
block discarded – undo |
|
160
|
160
|
*/ |
|
161
|
161
|
private function getChildrenRelationshipForeignKeys(string $tableName) : array |
|
162
|
162
|
{ |
|
163
|
|
- return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function () use ($tableName) { |
|
|
163
|
+ return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function() use ($tableName) { |
|
164
|
164
|
return $this->getChildrenRelationshipForeignKeysWithoutCache($tableName); |
|
165
|
165
|
}); |
|
166
|
166
|
} |
|
@@ -175,7 +175,7 @@ discard block |
|
|
block discarded – undo |
|
175
|
175
|
$children = $this->schemaAnalyzer->getChildrenRelationships($tableName); |
|
176
|
176
|
|
|
177
|
177
|
if (!empty($children)) { |
|
178
|
|
- $fksTables = array_map(function (ForeignKeyConstraint $fk) { |
|
|
178
|
+ $fksTables = array_map(function(ForeignKeyConstraint $fk) { |
|
179
|
179
|
return $this->getChildrenRelationshipForeignKeys($fk->getLocalTableName()); |
|
180
|
180
|
}, $children); |
|
181
|
181
|
|