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
returningResult uses RETURNING, but there is no way to get a full record.
return dsl.insertInto(MYTABLE)
.set(...)
.set(...)
.set(...)
.set(...)
.set(...)
.set(...)
.returningResult(MYTABLE) // returns a generic Record with a field of type "MYTABLE"
.fetchOne()
Possible solution
a regular .returning() might also use RETURNING statement.
I don't think jOOQ will do this with proper SQLDialect.POSTGRES configuration. Can you please show what you're doing with an MCVE? We have a template here: https://github.com/jOOQ/jOOQ-mcve
a regular .returning() might also use RETURNING statement.
That's what should be done. The only difference between returning() and returningResult() is the shape of the resulting record(s). There's no difference in generated SQL
2. add an asterisk overload for .returningResult()
Why would you need it?
)Call .returning() inside a transaction.
I'm not sure how a transaction would change anything, but I'm sure your MCVE will be able to help clarify.
Use case
I'm using PostgreSQL Currently
Runs two statements: first insert, then select.
returningResult
uses RETURNING, but there is no way to get a full record.Possible solution
.returning()
might also use RETURNING statement..returningResult()
Possible workarounds
jOOQ Version
Jooq 3.19.7
Database product and version
PostgreSQL 16.1
Java Version
openjdk 21.0.2
JDBC / R2DBC driver name and version (include name if unofficial driver)
org.postgresql:postgresql:42.7.3
The text was updated successfully, but these errors were encountered: