Retrieve arbitrary on-execution generated values within mutation statements
Description
We currently support retrieving identity generated ids through insert ... returning statements and the JDBC prepareStatement APIs that allow retrieving generated keys. It would be nice if other, non-identifier, on-exeuction generated values could be retrieved in this early and more efficient way for databases that support these features. We would, of course, fall back back to the current implementation using subsequent selects for other dialects.
We could try to generalize the logic behind what’s currently handled by InsertGeneratedIdentifierDelegate implementations to handle arbitrary values.
This would also eventually allow us to do this for other types mutation statements.
We currently support retrieving identity generated ids through
insert ... returning
statements and the JDBCprepareStatement
APIs that allow retrieving generated keys. It would be nice if other, non-identifier, on-exeuction generated values could be retrieved in this early and more efficient way for databases that support these features. We would, of course, fall back back to the current implementation using subsequent selects for other dialects.We could try to generalize the logic behind what’s currently handled by
InsertGeneratedIdentifierDelegate
implementations to handle arbitrary values.This would also eventually allow us to do this for other types mutation statements.