jOOQ / jOOQ

jOOQ is the best way to write SQL in Java
https://www.jooq.org
Other
6.11k stars 1.2k forks source link

Implement more uniform handling of AFTER INSERT trigger behaviour in various RETURNING emulations #15317

Open lukaseder opened 1 year ago

lukaseder commented 1 year ago

Various implementations of RETURNING are currently quite undefined with respect to the handling of AFTER INSERT triggers.

If a second query is run, then it seems obvious that fetching the row after the insert will effectively include AFTER INSERT trigger content.

If we can run a single query using native RETURNING, then this isn't the case. That became obvious when trying to implement SQLite's RETURNING clause support:

We should have a more unified and thus predictable way of handling this distinction.

lukaseder commented 10 months ago

This has been implemented as part of https://github.com/jOOQ/jOOQ/issues/13912

lukaseder commented 10 months ago

Ah no, this is specifically about AFTER triggers, which are currently being ignored in most RDBMS with BEFORE trigger support. I'll have to look at this again