Skip to content

Commit

Permalink
Return insertId in query result
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-hadden committed Oct 14, 2022
1 parent 3058bbe commit 815a9cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class PlanetScaleConnection implements DatabaseConnection {
}

return {
insertId: results.insertId !== null && results.insertId.toString() !== '0' ? BigInt(results.insertId) : undefined,
rows: results.rows as O[],
numUpdatedOrDeletedRows: results.rowsAffected == null ? undefined : BigInt(results.rowsAffected),
}
Expand Down

0 comments on commit 815a9cc

Please sign in to comment.