Skip to content

Commit e70cba0

Browse files
authored
Rename insertWithReturningPks() to insertReturningPks() (#361)
1 parent 672e9ad commit e70cba0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- New #355: Use `DateTimeColumn` class for datetime column types (@Tigrov)
4141
- New #356, #357: Implement `DMLQueryBuilder::upsertReturning()` method (@Tigrov)
4242
- Enh #356, #357: Refactor `Command::insertWithReturningPks()` and `DMLQueryBuilder::upsert()` methods (@Tigrov)
43-
- Enh #360: Implement `DMLQueryBuilder::insertWithReturningPks()` method (@Tigrov)
43+
- Enh #360, #361: Implement `DMLQueryBuilder::insertReturningPks()` method (@Tigrov)
4444
- Chg #362: Replace column and table name quote character from ` to " (@Tigrov)
4545

4646
## 1.2.0 March 21, 2024

src/DMLQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
final class DMLQueryBuilder extends AbstractDMLQueryBuilder
1919
{
20-
public function insertWithReturningPks(string $table, array|QueryInterface $columns, array &$params = []): string
20+
public function insertReturningPks(string $table, array|QueryInterface $columns, array &$params = []): string
2121
{
2222
$insertSql = $this->insert($table, $columns, $params);
2323
$tableSchema = $this->schema->getTableSchema($table);

tests/Provider/QueryBuilderProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static function insert(): array
112112
return $insert;
113113
}
114114

115-
public static function insertWithReturningPks(): array
115+
public static function insertReturningPks(): array
116116
{
117117
return [
118118
'regular-values' => [

tests/QueryBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,15 +509,15 @@ public function testInsert(
509509
parent::testInsert($table, $columns, $params, $expectedSQL, $expectedParams);
510510
}
511511

512-
#[DataProviderExternal(QueryBuilderProvider::class, 'insertWithReturningPks')]
513-
public function testInsertWithReturningPks(
512+
#[DataProviderExternal(QueryBuilderProvider::class, 'insertReturningPks')]
513+
public function testInsertReturningPks(
514514
string $table,
515515
array|QueryInterface $columns,
516516
array $params,
517517
string $expectedSQL,
518518
array $expectedParams
519519
): void {
520-
parent::testInsertWithReturningPks($table, $columns, $params, $expectedSQL, $expectedParams);
520+
parent::testInsertReturningPks($table, $columns, $params, $expectedSQL, $expectedParams);
521521
}
522522

523523
public function testRenameColumn(): void

0 commit comments

Comments
 (0)