Package org.hibernate.jdbc

A small API allowing the client of a Hibernate session to interact directly with JDBC, using the same connection and transaction obtained by the session.

Work andReturningWork define the notion of a unit of JDBC work that may be executed by the session at the request of the client. Execution of a unit of work may be requested by calling:

For example:

 session.doWork(connection -> {     try ( PreparedStatement ps = connection.prepareStatement( " ... " ) ) {         ps.execute();     } });

The interfaceExpectation defines a contract for checking the results of a JDBC operation which executes user-written SQL:

AnExpectation class may be specified along with the user-written SQL usingSQLInsert.verify(),SQLUpdate.verify(), orSQLDelete.verify().
See Also:
Work,ReturningWork,Expectation