ResultSetResultIterator(ResultSetMapper<Type> mapper, SQLStatement jdbiStatement, Statement stmt, StatementContext context) throws SQLException { this.mapper = mapper; this.context = context; this.jdbiStatement = jdbiStatement; this.results = stmt.getResultSet(); this.jdbiStatement.addCleanable(Cleanables.forResultSet(results)); }
ResultSetResultIterator(ResultSetMapper<Type> mapper, SQLStatement jdbiStatement, Statement stmt, StatementContext context) throws SQLException { this.mapper = mapper; this.context = context; this.jdbiStatement = jdbiStatement; this.results = stmt.getResultSet(); this.jdbiStatement.addCleanable(Cleanables.forResultSet(results)); }
/** * Creates a new wrapper object for generated keys as returned by the {@link Statement#getGeneratedKeys()} * method for update and insert statement for drivers that support this function. * * @param mapper Maps the generated keys result set to an object * @param jdbiStatement The original jDBI statement * @param stmt The corresponding sql statement * @param context The statement context */ GeneratedKeys(ResultSetMapper<Type> mapper, SQLStatement<?> jdbiStatement, Statement stmt, StatementContext context, ContainerFactoryRegistry containerFactoryRegistry) throws SQLException { this.mapper = mapper; this.jdbiStatement = jdbiStatement; this.stmt = stmt; this.results = stmt.getGeneratedKeys(); this.context = context; this.containerFactoryRegistry = containerFactoryRegistry.createChild(); this.jdbiStatement.addCleanable(Cleanables.forResultSet(results)); }
/** * Creates a new wrapper object for generated keys as returned by the {@link Statement#getGeneratedKeys()} * method for update and insert statement for drivers that support this function. * * @param mapper Maps the generated keys result set to an object * @param jdbiStatement The original jDBI statement * @param stmt The corresponding sql statement * @param context The statement context */ GeneratedKeys(ResultSetMapper<Type> mapper, SQLStatement<?> jdbiStatement, Statement stmt, StatementContext context, ContainerFactoryRegistry containerFactoryRegistry) throws SQLException { this.mapper = mapper; this.jdbiStatement = jdbiStatement; this.stmt = stmt; this.results = stmt.getGeneratedKeys(); this.context = context; this.containerFactoryRegistry = containerFactoryRegistry.createChild(); this.jdbiStatement.addCleanable(Cleanables.forResultSet(results)); }
addCleanable(new Cleanables.StatementBuilderCleanable(statementBuilder, handle.getConnection(), sql, stmt));
addCleanable(new Cleanables.StatementBuilderCleanable(statementBuilder, handle.getConnection(), sql, stmt));