Skip to content

Commit

Permalink
Merge branch 'master' into marin-3
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored May 16, 2024
2 parents f52eeb4 + 05c667a commit 4c3dba5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 2.0.0 under development

- Enh #289: Implement `SqlParser` and `ExpressionBuilder` driver classes (@Tigrov)
- Chg #307: Replace call of `SchemaInterface::getRawTableName()` to `QuoterInterface::getRawTableName()` (@Tigrov)

## 1.2.0 March 21, 2024

Expand Down
2 changes: 1 addition & 1 deletion src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ protected function findViewNames(string $schema = ''): array
*/
protected function getCacheKey(string $name): array
{
return array_merge([self::class], $this->generateCacheKey(), [$this->getRawTableName($name)]);
return array_merge([self::class], $this->generateCacheKey(), [$this->db->getQuoter()->getRawTableName($name)]);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ public function testAlterColumn(): void
*/
public function testBatchInsert(
string $table,
array $columns,
iterable $values,
array $columns,
string $expected,
array $expectedParams = [],
int $insertedRow = 1
): void {
parent::testBatchInsert($table, $columns, $values, $expected, $expectedParams, $insertedRow);
parent::testBatchInsert($table, $values, $columns, $expected, $expectedParams, $insertedRow);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/CommandProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public static function batchInsert(): array
{
$batchInsert = parent::batchInsert();

$batchInsert['batchInsert binds json params'] = [
$batchInsert['binds json params'] = [
'{{%type}}',
['int_col', 'char_col', 'float_col', 'bool_col', 'json_col'],
[
[1, 'a', 0.0, true, ['a' => 1, 'b' => true, 'c' => [1, 2, 3]]],
[2, 'b', -1.0, false, new JsonExpression(['d' => 'e', 'f' => false, 'g' => [4, 5, null]])],
],
['int_col', 'char_col', 'float_col', 'bool_col', 'json_col'],
'expected' => 'INSERT INTO `type` (`int_col`, `char_col`, `float_col`, `bool_col`, `json_col`) '
. 'VALUES (:qp0, :qp1, :qp2, :qp3, :qp4), (:qp5, :qp6, :qp7, :qp8, :qp9)',
'expectedParams' => [
Expand Down
4 changes: 2 additions & 2 deletions tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ public function testAlterColumn(): void
*/
public function testBatchInsert(
string $table,
array $columns,
iterable $rows,
array $columns,
string $expected,
array $expectedParams = [],
): void {
parent::testBatchInsert($table, $columns, $rows, $expected, $expectedParams);
parent::testBatchInsert($table, $rows, $columns, $expected, $expectedParams);
}

/**
Expand Down

0 comments on commit 4c3dba5

Please sign in to comment.