Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,22 @@ public static function upsert(): array
return $upsert;
}

public static function selectScalar(): array
{
$data = parent::selectScalar();

$data['true'][1] = "SELECT '1'";
$data['false'][1] = "SELECT '0'";
$data['array'][1] = "SELECT 1, '1', 12.34";
$data['string keys'][1] = 'SELECT 1 AS "a", \'1\' AS "b", 12.34';

foreach ($data as &$values) {
$values[1] .= ' FROM DUAL';
}

return $data;
}

public static function buildColumnDefinition(): array
{
$referenceRestrict = new ForeignKey(
Expand Down Expand Up @@ -452,7 +468,7 @@ public static function caseExpressionBuilder(): array
3,
];
$data['without case expression'][1] = 'CASE WHEN "column_name" = 1 THEN :qp0'
. ' WHEN "column_name" = 2 THEN (SELECT :pv1 FROM DUAL) END';
. ' WHEN "column_name" = 2 THEN (SELECT :qp1 FROM DUAL) END';

return $data;
}
Expand Down