コード例 #1
0
  @Before
  public void initialize() {

    Connection db = getConnection();
    long app = getAppId();
    try {
      db.deleteByQuery(app, "Record_number > 0");
    } catch (Exception e) {
      fail("Can not initialize the app");
    }
  }
コード例 #2
0
  @Test
  public void testDeleteByQuery() {
    Connection db = getConnection();
    long app = getAppId();
    try {
      List<Long> ids = insertRecords();
      db.deleteByQuery(app, "Single_line_text = \"foo\"");

      ResultSet rs = db.select(app, "");
      if (rs.size() != 2) {
        fail("failed to delete");
      }
    } catch (Exception e) {
      fail("db exception");
    }
  }