public SqlDaoIterable(Cursor<Record> result, Iterator<T> iterator, DSLContext context){ this(result, iterator, JooqUtils.getConnection(context)); }
public static void commit(DSLContext context) throws DaoException { try { getConnection(context).commit(); } catch (SQLException e) { throw new DaoException(e); } }
public void freeJooq(DSLContext context) { Connection conn = JooqUtils.getConnection(context); if (conn != null) { try { if (!conn.getAutoCommit()) { conn.commit(); } } catch (SQLException e) { throw new RuntimeException(e); } closeQuietly(conn); } }
/** * Rollback the current transaction. * If a SQLException occurs while rolling back, it logs the error and returns false, * but does not rethrow the exception. * * @param context */ public static boolean rollbackQuietly(DSLContext context) { if (context == null) { return false; } return WpDataSource.rollbackQuietly(getConnection(context)); }