File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,16 @@ class PlanetScaleConnection implements DatabaseConnection {
124124 throw ( results as any ) . error
125125 }
126126
127+ const numAffectedRows = results . rowsAffected == null ? undefined : BigInt ( results . rowsAffected )
128+
127129 return {
128130 insertId : results . insertId !== null && results . insertId . toString ( ) !== '0' ? BigInt ( results . insertId ) : undefined ,
129131 rows : results . rows as O [ ] ,
130- numUpdatedOrDeletedRows : results . rowsAffected == null ? undefined : BigInt ( results . rowsAffected ) ,
132+ // @ts -ignore replaces `QueryResult.numUpdatedOrDeletedRows` in kysely > 0.22
133+ // following https://github.com/koskimas/kysely/pull/188
134+ numAffectedRows,
135+ // deprecated in kysely > 0.22, keep for backward compatibility.
136+ numUpdatedOrDeletedRows : numAffectedRows ,
131137 }
132138 }
133139
You can’t perform that action at this time.
0 commit comments