@Override public int[] executeBatch() throws SQLException { checkOpen(); try { return super.executeBatch(); } catch (UnsupportedOperationException e) { throw new SQLFeatureNotSupportedException(e.getMessage(), e); } }
@Test public void testUpdateCounts() throws SQLException { long[] longValues = new long[] {-1, -3, 1, 5, ((long) Integer.MAX_VALUE) + 1}; int[] intValues = new int[] {-1, -3, 1, 5, Integer.MAX_VALUE}; when(statement.executeBatch()).thenCallRealMethod(); when(statement.executeLargeBatch()).thenCallRealMethod(); when(statement.executeBatchInternal()).thenReturn(longValues); assertArrayEquals(intValues, statement.executeBatch()); assertArrayEquals(longValues, statement.executeLargeBatch()); }
@Test public void testUpdateCounts() throws SQLException { long[] longValues = new long[] {-1, -3, 1, 5, ((long) Integer.MAX_VALUE) + 1}; int[] intValues = new int[] {-1, -3, 1, 5, Integer.MAX_VALUE}; when(statement.executeBatch()).thenCallRealMethod(); when(statement.executeLargeBatch()).thenCallRealMethod(); when(statement.executeBatchInternal()).thenReturn(longValues); assertArrayEquals(intValues, statement.executeBatch()); assertArrayEquals(longValues, statement.executeLargeBatch()); }
@Override public int[] executeBatch() throws SQLException { throwIfClosed(); try { return super.executeBatch(); } catch (UnsupportedOperationException e) { throw new SQLFeatureNotSupportedException(e.getMessage(), e); } }
@Override public int[] executeBatch() throws SQLException { checkOpen(); try { return super.executeBatch(); } catch (UnsupportedOperationException e) { throw new SQLFeatureNotSupportedException(e.getMessage(), e); } }