File tree 1 file changed +7
-1
lines changed
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 {
124
124
throw ( results as any ) . error
125
125
}
126
126
127
+ const numAffectedRows = results . rowsAffected == null ? undefined : BigInt ( results . rowsAffected )
128
+
127
129
return {
128
130
insertId : results . insertId !== null && results . insertId . toString ( ) !== '0' ? BigInt ( results . insertId ) : undefined ,
129
131
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 ,
131
137
}
132
138
}
133
139
You can’t perform that action at this time.
0 commit comments