Exemple #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");
  }
Exemple #2
0
 @Test
 public void testConjunction() {
   assertSelection(Sel.and(constant(0), constant(1)), "(0) and (1)");
 }
Exemple #3
0
 @Test
 public void testDisjunction() {
   assertSelection(Sel.or(constant(0), constant(1)), "(0) or (1)");
 }
Exemple #4
0
 @Test
 public void testNegation() {
   assertSelection(Sel.not(constant(0)), "not (0)");
 }