Package org.jdbi.v3.oracle12
Class OracleReturning
java.lang.Object
org.jdbi.v3.oracle12.OracleReturning
Returns a
ResultBearing from Oracle's "DML Returning" features introduced in 10.2. To use,
add a returnParameters() customizer to the statement and register with one or more return parameters. Then
execute the statement with returningDml() result producer:
List<Integer> ids = handle.createUpdate("insert into something (id, name) values (17, 'Brian') returning id into ?")
.addCustomizer(OracleReturning.returnParameters().register(1, OracleTypes.INTEGER))
.execute(OracleReturning.returningDml())
.mapTo(int.class)
.list();
assertThat(ids).containsExactly(17);
This class still is beta, and may be changed incompatibly or removed at any time.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jdbi.v3.core.result.ResultProducer<org.jdbi.v3.core.result.ResultBearing>Result producer that returns aResultBearingover the statement "DML returning" parameters.
-
Method Details
-
returnParameters
-
returningDml
public static org.jdbi.v3.core.result.ResultProducer<org.jdbi.v3.core.result.ResultBearing> returningDml()Result producer that returns aResultBearingover the statement "DML returning" parameters. Used in conjunction withreturnParameters()to register return parameters.- Returns:
- ResultBearing of returned columns.
- See Also:
-
OraclePreparedStatement.getReturnResultSet()
-