Examples of executeBatchDetailed()


Examples of com.alibaba.druid.support.ibatis.SqlMapClientWrapper.executeBatchDetailed()

            Assert.assertNotNull(error);
        }
       
        wrapper.startBatch();
        wrapper.executeBatch();
        wrapper.executeBatchDetailed();
    }
}
View Full Code Here

Examples of com.alibaba.druid.support.ibatis.SqlMapExecutorWrapper.executeBatchDetailed()

            Assert.assertNotNull(error);
        }
       
        wrapper.startBatch();
        wrapper.executeBatch();
        wrapper.executeBatchDetailed();
    }
}
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.executeBatchDetailed()

        session.startBatch();
        for (T item : items) {
          session.update(statementId, item);
        }
        try {
          return session.executeBatchDetailed();
        } catch (BatchException e) {
          throw e.getBatchUpdateException();
        }
      }
      catch (SQLException ex) {
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.executeBatchDetailed()

    sms.setUserConnection(null);
    sms.startBatch();
    when(sms.update("updateFoo", new Foo("bar"))).thenReturn(-2);
    List<BatchResult> results = Collections.singletonList(new BatchResult("updateFoo", "update foo"));
    results.get(0).setUpdateCounts(new int[] {1});
    when(sms.executeBatchDetailed()).thenReturn(results);
    writer.write(Collections.singletonList(new Foo("bar")));
  }

  @Test
  public void testWriteAndFlushWithEmptyUpdate() throws Exception {
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.executeBatchDetailed()

    sms.setUserConnection(null);
    sms.startBatch();
    when(sms.update("updateFoo", new Foo("bar"))).thenReturn(1);
    List<BatchResult> results = Collections.singletonList(new BatchResult("updateFoo", "update foo"));
    results.get(0).setUpdateCounts(new int[] {0});
    when(sms.executeBatchDetailed()).thenReturn(results);
    try {
      writer.write(Collections.singletonList(new Foo("bar")));
      fail("Expected EmptyResultDataAccessException");
    }
    catch (EmptyResultDataAccessException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.