Problem
Perry's pg binding's result object is unreadable from TypeScript on the sqlx (legacy, currently-shipping) transport path. res.command, res.rowCount and res.rows all read back undefined.
Reproducer
On Perry's base commit 7f77cce3c6, every query in a straightforward pg fixture prints:
create: command=undefined rowCount=undefined rows=undefined
Status
Fixed for clients that take the (unmerged) turnloop transport path added by Perry's P7 lane — but the currently-shipping sqlx-based path on main still has this bug. Two related divergences from node-postgres, also reproduced on the base commit, are worth tracking alongside this if not folded into the same fix:
|
Node |
Perry base (sqlx path) |
rowCount on INSERT/UPDATE/DELETE |
the affected count |
undefined |
rowCount on DDL |
null |
undefined |
What would fix it
Whatever conversion step turns the sqlx query result into the JS-visible result object is not populating command/rowCount/rows at all on this path. The turnloop-side fix (unmerged) is a working reference for the expected shape.
Problem
Perry's
pgbinding's result object is unreadable from TypeScript on thesqlx(legacy, currently-shipping) transport path.res.command,res.rowCountandres.rowsall read backundefined.Reproducer
On Perry's base commit
7f77cce3c6, every query in a straightforwardpgfixture prints:Status
Fixed for clients that take the (unmerged) turnloop transport path added by Perry's P7 lane — but the currently-shipping
sqlx-based path onmainstill has this bug. Two related divergences fromnode-postgres, also reproduced on the base commit, are worth tracking alongside this if not folded into the same fix:rowCounton INSERT/UPDATE/DELETEundefinedrowCounton DDLnullundefinedWhat would fix it
Whatever conversion step turns the
sqlxquery result into the JS-visible result object is not populatingcommand/rowCount/rowsat all on this path. The turnloop-side fix (unmerged) is a working reference for the expected shape.