porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
The Unlicense
7.32k stars 265 forks source link

Update README.md (Transactions added missing returning *) #662

Closed MarisaCodes closed 1 year ago

MarisaCodes commented 1 year ago

Check issue: https://github.com/porsager/postgres/issues/649

This is a minor modification but debugging this has taken a couple of hours for me as I am slightly new to SQL syntax and to postgreSQL in general. I was trying to use the empty return from sql.begin but it turned out that the callback in sql.begin was the one returning the empty array even though the insert was successful.

porsager commented 1 year ago

Thanks a lot @MarisaCodes , and sorry that caused so much trouble for you 😞

MarisaCodes commented 1 year ago

Thanks a lot @MarisaCodes , and sorry that caused so much trouble for you 😞

No it didn't it was quite a simple oversight on my part too since I was new to postgres. Thank you!!