Skip to content

Commit d1b4a15

Browse files
authored
Rename getLastInsertID() method in ConnectionInterface to getLastInsertId() (#353)
1 parent 6f6a18d commit d1b4a15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function insertWithReturningPks(string $table, array $columns): array|fal
3737
$result = [];
3838
foreach ($tablePrimaryKeys as $name) {
3939
if ($tableSchema?->getColumn($name)?->isAutoIncrement()) {
40-
$result[$name] = $this->db->getLastInsertID((string) $tableSchema?->getSequenceName());
40+
$result[$name] = $this->db->getLastInsertId((string) $tableSchema?->getSequenceName());
4141
continue;
4242
}
4343

tests/PdoConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testGetLastInsertID(): void
8989
]
9090
)->execute();
9191

92-
$this->assertSame('4', $db->getLastInsertID());
92+
$this->assertSame('4', $db->getLastInsertId());
9393

9494
$db->close();
9595
}

0 commit comments

Comments
 (0)