-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Problem doing Upsert in version 0.5.4 #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's possible to retrieve number of rows affected by an insert and update. It's not fully implemented in the native bindings, but does work in the pure javascript version. I'll work on this within the next week or two. In the mean time use pure javascript version and have a look here: |
Thanks!! I'll keep an eye out for the new release! ;) |
This should work now. Finally got around to some bug squashing. |
brianc
added a commit
that referenced
this issue
Dec 20, 2019
* Upgrade dependencies - There was a security vuln with mocha, so upgraded mocha. - Upgraded versions of node we're going to check in travis - Switched to yarn from npm - Removed --no-exit as that's standard mocha behavior now * Enable postgres on newer version of travis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there! Congrats on the excelent job!
I'm trying to do an upsert using node-postgres. The logic I was trying to implement was if an update returned error it should do the insert.
Both updates and inserts work but the code always executes both because the update statement returns the same values for success and error.
Have anyone tried this? Can anyone give a help please?
You can find full details (code + debug) here:
http://stackoverflow.com/questions/7910174/upsert-in-postgres-using-node-js
Thanks and congrats
The text was updated successfully, but these errors were encountered: