Support for INSERT ... RETURNING
See original GitHub issueSupprt for INSERT … RETURNING could improve existing API. (http://www.postgresql.org/docs/8.4/static/sql-insert.html) Maybe passing argument to Query end event callback will be good approach?
query.on('end', function(row) {
if(row) {
// RETURNING uesd
}
else {
// standard end event
}
});
Issue Analytics
- State:
- Created 12 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
INSERT...RETURNING - MariaDB Knowledge Base
This returns the listed columns for all the rows that are inserted, or alternatively, the specified SELECT expression.
Read more >6.4. Returning Data from Modified Rows - PostgreSQL
The INSERT , UPDATE , and DELETE commands all have an optional RETURNING clause that supports this. Use of RETURNING avoids performing an...
Read more >INSERT .. RETURNING - jOOQ
The Postgres database has native support for an INSERT .. RETURNING clause. This is a very powerful concept that is emulated for all...
Read more >Support insert returning · Issue #47 · MagicStack/asyncpg
In PostgreSQL INSERT support RETURNING values, but asyncpg on con.exec returns only success result of inserting, how to support returning ...
Read more >RETURNING clause in INSERT INTO ... SELECT ... possible?
Looks like a the RETURNING clause cannot be used for INSERT INTO SELECT. I tried and it gives error. My DB is 11g...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
RETURNING works. It triggers a “row” event just fine.
If you want to use event listeners, then do this:
Currently the result does not automatically accumulate rows unless you use a callback. If you want to accumulate rows using event listeners, you have to do this:
This issue could be closed.
Thank you! ❤️