You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
Is your feature request related to a problem? Please describe
While playing around with r2dbc, I wanted to read the returned results from an INSERT. Given the table TEST with columns ID and DESCRIPTION, when insert a row like this (postgres):
handle.execute("INSERT INTO TEST VALUES (1$, $2) RETURNING ID", 1, "bla")
I found out that that execute() always maps the result into an integer that shows the number of affected rows. I was wishing to be able to read the result of the query. I am aware that not all databases supports RETURNING in INSERT
Describe the solution you'd like
being able to access the result using .mapResult or .map
Describe alternatives you've considered
An alternative way to get the ID is to pre-set from the provided value. Another solution for sequence id is to read them using a select query before executing the INSERT statement
The text was updated successfully, but these errors were encountered:
Feature Request
Is your feature request related to a problem? Please describe
While playing around with r2dbc, I wanted to read the returned results from an INSERT. Given the table
TEST
with columnsID
andDESCRIPTION
, when insert a row like this (postgres):I found out that that
execute()
always maps the result into an integer that shows the number of affected rows. I was wishing to be able to read the result of the query. I am aware that not all databases supportsRETURNING
inINSERT
Describe the solution you'd like
being able to access the result using
.mapResult
or.map
Describe alternatives you've considered
An alternative way to get the ID is to pre-set from the provided value. Another solution for sequence id is to read them using a select query before executing the
INSERT
statementThe text was updated successfully, but these errors were encountered: