@@ 1324-1336 (lines=13) @@ | ||
1321 | case ($expr instanceof AST\NullIfExpression): |
|
1322 | case ($expr instanceof AST\CoalesceExpression): |
|
1323 | case ($expr instanceof AST\GeneralCaseExpression): |
|
1324 | case ($expr instanceof AST\SimpleCaseExpression): |
|
1325 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
|
1326 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
|
1327 | ||
1328 | $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1329 | ||
1330 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
|
1331 | ||
1332 | if ( ! $hidden) { |
|
1333 | // We cannot resolve field type here; assume 'string'. |
|
1334 | $this->rsm->addScalarResult($columnAlias, $resultAlias, 'string'); |
|
1335 | } |
|
1336 | break; |
|
1337 | ||
1338 | case ($expr instanceof AST\Subselect): |
|
1339 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
|
@@ 1338-1350 (lines=13) @@ | ||
1335 | } |
|
1336 | break; |
|
1337 | ||
1338 | case ($expr instanceof AST\Subselect): |
|
1339 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
|
1340 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
|
1341 | ||
1342 | $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1343 | ||
1344 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
|
1345 | ||
1346 | if ( ! $hidden) { |
|
1347 | // We cannot resolve field type here; assume 'string'. |
|
1348 | $this->rsm->addScalarResult($columnAlias, $resultAlias, 'string'); |
|
1349 | } |
|
1350 | break; |
|
1351 | ||
1352 | case ($expr instanceof AST\NewObjectExpression): |
|
1353 | $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); |