Пример #1
0
  @Test
  public void testParameterForwarding() {
    assertSelection(Sel.not(Sel.filter("col", "a", "b")), "not (col in (?,?))", "a", "b");

    assertSelection(
        Sel.and(constant(42), Sel.filter("col", "1", "2")), "(42) and (col in (?,?))", "1", "2");

    assertSelection(
        Sel.or(Sel.filter("colA", "a"), Sel.filter("colB", "b")),
        "(colA = ?) or (colB = ?)",
        "a",
        "b");
  }
Пример #2
0
 @Test
 public void testNegation() {
   assertSelection(Sel.not(constant(0)), "not (0)");
 }