@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | TABLE_NAME = '{$tableName}' |
| 98 | 98 | AND OWNER = '{$schemaName}' |
| 99 | 99 | ORDER BY a.COLUMN_ID |
| 100 | -EOD; |
|
| 100 | +eod; |
|
| 101 | 101 | $this->getDbConnection()->setActive(true); |
| 102 | 102 | $this->getDbConnection()->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); |
| 103 | 103 | $command = $this->getDbConnection()->createCommand($sql); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | from ALL_OBJECTS |
| 162 | 162 | where OBJECT_NAME = '{$tableName}' |
| 163 | 163 | and OWNER = '{$schemaName}' |
| 164 | -EOD; |
|
| 164 | +eod; |
|
| 165 | 165 | $this->getDbConnection()->setActive(true); |
| 166 | 166 | $command = $this->getDbConnection()->createCommand($sql); |
| 167 | 167 | //$command->bindValue(':schema',$schemaName); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | and a.TABLE_NAME = '{$tableName}' |
| 270 | 270 | and a.OWNER = '{$schemaName}' |
| 271 | 271 | and a.CONSTRAINT_TYPE in ('P','R') |
| 272 | -EOD; |
|
| 272 | +eod; |
|
| 273 | 273 | $this->getDbConnection()->setActive(true); |
| 274 | 274 | $command = $this->getDbConnection()->createCommand($sql); |
| 275 | 275 | //$command->bindValue(':table', $tableName); |
@@ -359,13 +359,13 @@ discard block |
||
| 359 | 359 | if ($schema === '') { |
| 360 | 360 | $sql = <<<EOD |
| 361 | 361 | SELECT table_name, '{$schema}' as table_schema FROM user_tables |
| 362 | -EOD; |
|
| 362 | +eod; |
|
| 363 | 363 | $command = $this->getDbConnection()->createCommand($sql); |
| 364 | 364 | } else { |
| 365 | 365 | $sql = <<<EOD |
| 366 | 366 | SELECT object_name as table_name, owner as table_schema FROM all_objects |
| 367 | 367 | WHERE object_type = 'TABLE' AND owner=:schema |
| 368 | -EOD; |
|
| 368 | +eod; |
|
| 369 | 369 | $command = $this->getDbConnection()->createCommand($sql); |
| 370 | 370 | $command->bindParam(':schema', $schema); |
| 371 | 371 | } |
@@ -319,7 +319,7 @@ |
||
| 319 | 319 | REFERENCED_TABLE_NAME IS NOT NULL |
| 320 | 320 | AND TABLE_NAME LIKE :table |
| 321 | 321 | $andSchema |
| 322 | -EOD; |
|
| 322 | +eod; |
|
| 323 | 323 | $command = $this->getDbConnection()->createCommand($sql); |
| 324 | 324 | $command->bindValue(':table', $tableName); |
| 325 | 325 | if ($schemaName !== null) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | INFORMATION_SCHEMA.COLUMNS c |
| 83 | 83 | WHERE t.table_name = c.table_name |
| 84 | 84 | AND t.table_name = :table |
| 85 | -EOD; |
|
| 85 | +eod; |
|
| 86 | 86 | if ($schemaName !== null) { |
| 87 | 87 | $sql .= ' AND t.table_schema = :schema'; |
| 88 | 88 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | AND |
| 209 | 209 | c.constraint_type ='PRIMARY KEY' |
| 210 | 210 | AND k.table_name = :table |
| 211 | -EOD; |
|
| 211 | +eod; |
|
| 212 | 212 | $command = $this->getDbConnection()->createCommand($sql); |
| 213 | 213 | $command->bindValue(':table', $col['TABLE_NAME']); |
| 214 | 214 | $primary = []; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | RC.UNIQUE_CONSTRAINT_NAME |
| 253 | 253 | AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION |
| 254 | 254 | WHERE KCU1.TABLE_NAME = :table |
| 255 | -EOD; |
|
| 255 | +eod; |
|
| 256 | 256 | $command = $this->getDbConnection()->createCommand($sql); |
| 257 | 257 | $command->bindValue(':table', $col['TABLE_NAME']); |
| 258 | 258 | $fkeys = []; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $sql = <<<EOD |
| 292 | 292 | SELECT TABLE_NAME, TABLE_SCHEMA FROM [INFORMATION_SCHEMA].[TABLES] |
| 293 | 293 | WHERE TABLE_SCHEMA=:schema AND $condition |
| 294 | -EOD; |
|
| 294 | +eod; |
|
| 295 | 295 | $command = $this->getDbConnection()->createCommand($sql); |
| 296 | 296 | $command->bindParam(":schema", $schema); |
| 297 | 297 | $rows = $command->queryAll(); |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | if (($where = $criteria->getCondition()) === null) { |
| 234 | 234 | $where = '1=1'; |
| 235 | 235 | } |
| 236 | - $sql = "SELECT {$fkTable}.*, {$srcColumns} FROM {$fkTable} {$innerJoin} WHERE {$where}"; |
|
| 236 | + $sql = "select {$fkTable}.*, {$srcColumns} FROM {$fkTable} {$innerJoin} WHERE {$where}"; |
|
| 237 | 237 | |
| 238 | 238 | $parameters = $criteria->getParameters()->toArray(); |
| 239 | 239 | $ordering = $criteria->getOrdersBy(); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
| 163 | - * @return TDataGatewayCommand |
|
| 163 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
| 164 | 164 | */ |
| 165 | 165 | protected function getCommandBuilder() |
| 166 | 166 | { |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | - * @return TDataGatewayCommand |
|
| 171 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
| 172 | 172 | */ |
| 173 | 173 | protected function getForeignCommandBuilder() |
| 174 | 174 | { |
@@ -227,6 +227,7 @@ discard block |
||
| 227 | 227 | * @param array $foreignKeys field names |
| 228 | 228 | * @param array $indexValues field values |
| 229 | 229 | * @param array $sourceKeys source table column names. |
| 230 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
| 230 | 231 | */ |
| 231 | 232 | public function createCommand($criteria, $foreignKeys, $indexValues, $sourceKeys) |
| 232 | 233 | { |
@@ -344,6 +345,9 @@ discard block |
||
| 344 | 345 | return $this->getCommandBuilder()->onExecuteCommand($command, $command->execute()) > 0; |
| 345 | 346 | } |
| 346 | 347 | |
| 348 | + /** |
|
| 349 | + * @param TActiveRecord $obj |
|
| 350 | + */ |
|
| 347 | 351 | private function updateAssociationTable($obj, $fkObjects, $builder) |
| 348 | 352 | { |
| 349 | 353 | $source = $this->getSourceRecordValues($obj); |
@@ -29,6 +29,6 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class TActiveRecordInvalidFinderResult extends \Prado\TEnumerable |
| 31 | 31 | { |
| 32 | - const Null = 'Null'; |
|
| 32 | + const null = 'Null'; |
|
| 33 | 33 | const Exception = 'Exception'; |
| 34 | 34 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | if (is_file($filename) == false) { |
| 143 | - throw new Exception("File $filename not found"); |
|
| 143 | + throw new Exception("file $filename not found"); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | include_once $filename; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $pageContent |
| 82 | 82 | |
| 83 | 83 | </com:TContent> |
| 84 | -EOD; |
|
| 84 | +eod; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | private function getPageContent($tableName, $type) |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | { |
| 151 | 151 | |
| 152 | 152 | } |
| 153 | -EOD; |
|
| 153 | +eod; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | // </editor-fold> |
@@ -231,7 +231,7 @@ |
||
| 231 | 231 | |
| 232 | 232 | $toString |
| 233 | 233 | } |
| 234 | -EOD; |
|
| 234 | +eod; |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // </editor-fold> |
@@ -205,6 +205,10 @@ |
||
| 205 | 205 | return $code; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $classname |
|
| 210 | + * @param string $toString |
|
| 211 | + */ |
|
| 208 | 212 | protected function generateClass($properties, $tablename, $classname, $toString) |
| 209 | 213 | { |
| 210 | 214 | $props = implode("\n", $properties); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | <th> </th> |
| 84 | 84 | <th>Category</th><th>Message</th><th>Time Spent (s)</th><th>Cumulated Time Spent (s)</th> |
| 85 | 85 | </tr> |
| 86 | -EOD; |
|
| 86 | +eod; |
|
| 87 | 87 | } else { |
| 88 | 88 | $string = <<<EOD |
| 89 | 89 | <table cellspacing="0" cellpadding="2" border="0" width="100%" style="table-layout:auto"> |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | <th style="width: 15px"> </th> |
| 96 | 96 | <th style="width: auto">Category</th><th style="width: auto">Message</th><th style="width: 120px">Time Spent (s)</th><th style="width: 150px">Cumulated Time Spent (s)</th> |
| 97 | 97 | </tr> |
| 98 | -EOD; |
|
| 98 | +eod; |
|
| 99 | 99 | } |
| 100 | 100 | return $string; |
| 101 | 101 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | <td class="time">{$delta}</td> |
| 119 | 119 | <td class="cumulatedtime">{$total}</td> |
| 120 | 120 | </tr> |
| 121 | -EOD; |
|
| 121 | +eod; |
|
| 122 | 122 | } else { |
| 123 | 123 | $bgcolor = $info['even'] ? "#fff" : "#eee"; |
| 124 | 124 | $color = $this->getColorLevel($log[1]); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | <td style="text-align:center">{$delta}</td> |
| 131 | 131 | <td style="text-align:center">{$total}</td> |
| 132 | 132 | </tr> |
| 133 | -EOD; |
|
| 133 | +eod; |
|
| 134 | 134 | } |
| 135 | 135 | return $string; |
| 136 | 136 | } |