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 @@ -115,11 +115,11 @@ public function rollBack(): void
115115 }
116116
117117
118- public function getInsertId (?string $ sequence = null ): string
118+ public function getInsertId (?string $ sequence = null ): int | string
119119 {
120120 try {
121121 $ res = $ this ->pdo ->lastInsertId ($ sequence );
122- return $ res === false ? ' 0 ' : $ res ;
122+ return $ res === false ? 0 : $ res ;
123123 } catch (PDOException $ e ) {
124124 throw new ($ this ->convertException ($ e , $ args ))(...$ args );
125125 }
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