File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ public function setRowNormalizer(?callable $normalizer): static
138138 }
139139
140140
141- public function getInsertId (?string $ sequence = null ): string
141+ public function getInsertId (?string $ sequence = null ): int | string
142142 {
143143 return $ this ->getConnectionDriver ()->getInsertId ($ sequence );
144144 }
Original file line number Diff line number Diff line change @@ -112,11 +112,11 @@ public function rollBack(): void
112112 }
113113
114114
115- public function getInsertId (?string $ sequence = null ): string
115+ public function getInsertId (?string $ sequence = null ): int | string
116116 {
117117 try {
118118 $ res = $ this ->pdo ->lastInsertId ($ sequence );
119- return $ res === false ? ' 0 ' : $ res ;
119+ return $ res === false ? 0 : $ res ;
120120 } catch (PDOException $ e ) {
121121 throw new ($ this ->convertException ($ e , $ args ))(...$ args );
122122 }
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function transaction(callable $callback): mixed
5656 }
5757
5858
59- public function getInsertId (?string $ sequence = null ): string
59+ public function getInsertId (?string $ sequence = null ): int | string
6060 {
6161 return $ this ->connection ->getInsertId ($ sequence );
6262 }
You can’t perform that action at this time.
0 commit comments