Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions tests/Provider/ColumnFactoryProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public static function dbTypes(): array
['float', ColumnType::FLOAT, DoubleColumn::class],
['real', ColumnType::FLOAT, DoubleColumn::class],
['double', ColumnType::DOUBLE, DoubleColumn::class],
['decimal', ColumnType::DECIMAL, DoubleColumn::class],
['numeric', ColumnType::DECIMAL, DoubleColumn::class],
['decimal', ColumnType::DECIMAL, StringColumn::class],
['numeric', ColumnType::DECIMAL, StringColumn::class],
['char', ColumnType::CHAR, StringColumn::class],
['varchar', ColumnType::STRING, StringColumn::class],
['string', ColumnType::STRING, StringColumn::class],
Expand Down
9 changes: 5 additions & 4 deletions tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

use function array_replace;
use function array_splice;
use function in_array;
use function strtr;

final class QueryBuilderProvider extends \Yiisoft\Db\Tests\Provider\QueryBuilderProvider
Expand Down Expand Up @@ -197,9 +198,9 @@ public static function insertReturningPks(): array
['order_id' => 1, 'item_id' => 1, 'quantity' => 1, 'subtotal' => 1.0],
[],
<<<SQL
INSERT INTO {{%order_item}} ("order_id", "item_id", "quantity", "subtotal") VALUES (1, 1, 1, 1) RETURNING "order_id", "item_id"
INSERT INTO {{%order_item}} ("order_id", "item_id", "quantity", "subtotal") VALUES (1, 1, 1, :qp0) RETURNING "order_id", "item_id"
SQL,
[],
[':qp0' => new Param('1', DataType::STRING)],
],
];
}
Expand Down Expand Up @@ -324,9 +325,9 @@ public static function upsertReturning(): array
['id_1' => 1, 'id_2' => 2.5, 'type' => 'Test'],
true,
['id_1', 'id_2'],
'INSERT INTO "notauto_pk" ("id_1", "id_2", "type") VALUES (1, 2.5, :qp0)'
'INSERT INTO "notauto_pk" ("id_1", "id_2", "type") VALUES (1, :qp0, :qp1)'
. ' ON CONFLICT ("id_1", "id_2") DO UPDATE SET "type"=EXCLUDED."type" RETURNING "id_1", "id_2"',
[':qp0' => new Param('Test', DataType::STRING)],
[':qp0' => new Param('2.5', DataType::STRING), ':qp1' => new Param('Test', DataType::STRING)],
],
'no return columns' => [
'type',
Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/SchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ public static function columns(): array
'blob_col' => new BinaryColumn(
dbType: 'blob',
),
'numeric_col' => new DoubleColumn(
'numeric_col' => new StringColumn(
ColumnType::DECIMAL,
dbType: 'decimal',
size: 5,
scale: 2,
defaultValue: 33.22,
defaultValue: '33.22',
),
'timestamp_col' => new DatetimeColumn(
ColumnType::TIMESTAMP,
Expand Down
4 changes: 2 additions & 2 deletions tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@ public function testInsertReturningPks(
string $table,
Closure|array|QueryInterface $columns,
array $params,
string $expectedSQL,
string $expectedSql,
array $expectedParams,
): void {
parent::testInsertReturningPks($table, $columns, $params, $expectedSQL, $expectedParams);
parent::testInsertReturningPks($table, $columns, $params, $expectedSql, $expectedParams);
}

public function testRenameColumn(): void
Expand Down
Loading