Friday 21 April 2017

Using pgp.helpers.insert with RETURNING in statement

I've got really good help with creating INSERT statements dynamically in a previous question: NodeJS and pg-promise, insert dynamically from JSON-object

I've tried to look at the docs, and would like to include RETURNING in the INSERT statement, so I get the inserted record as output with pg-promise.

I'm using NodeJS with pg-promise.

Is it possible to return the inserted record with all columns?



via Michael Nielsen

No comments:

Post a Comment