electric-sql / pglite

Lightweight WASM Postgres with real-time, reactive bindings.
https://pglite.dev
Apache License 2.0
8.33k stars 164 forks source link

`affectedRows` not being returned in UPDATE `.query` method #68

Closed pmooney-socraticworks closed 5 months ago

pmooney-socraticworks commented 6 months ago

I'm on version 1.1 of pglite, and am finding that my update query is not returning the affectedRows field as mentioned here

Given a query

UPDATE "todo" SET "name"='foo' WHERE "id" = 1;

My result is:

{ rows: [], fields: [] }

I'd expect my query to return

{ rows: [], fields: [], affectedRows: 1 }

I see affectedRows is being returned in SELECT queries, FWIW.