Examples of UnaryRelationalExpression


Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

        new UnaryExpression(Op.NOT, number(1)), Op.AND, number(2)));
  }
 
  public void testExists() {
    assertParser(ExpressionParser.exists(RelationParser.TABLE), "exists t",
        new UnaryRelationalExpression(table("t"), Op.EXISTS));
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

        new UnaryRelationalExpression(table("t"), Op.EXISTS));
  }
 
  public void testNotExists() {
    assertParser(ExpressionParser.notExists(RelationParser.TABLE), "not exists t",
        new UnaryRelationalExpression(table("t"), Op.NOT_EXISTS));
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

    assertParser(parser, "(1 < 2 or not exists t)",
        new BinaryExpression(
            new BinaryExpression(number(1), Op.LT, number(2)),
            Op.OR,
            new UnaryExpression(Op.NOT,
                new UnaryRelationalExpression(table("t"), Op.EXISTS))
        )
    );
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

            new BinaryExpression(ExpressionParserTest.name("x"), Op.GT, number(1)), null, null));
    assertParser(parser, "select 1 from t where exists (select * from t2)",
        new Select(false,
            Arrays.asList(new Projection(number(1), null)),
            Arrays.asList(table("t")),
            new UnaryRelationalExpression(
                new Select(false,
                    Arrays.asList(new Projection(ExpressionParserTest.wildcard(), null)),
                    Arrays.asList(table("t2")),
                    null, null, null),
                Op.EXISTS), null, null));
    assertParser(parser, "select case when exists (select * from t1) then 1 end from t",
        new Select(false,
            Arrays.asList(new Projection(
                ExpressionParserTest.fullCase(new UnaryRelationalExpression(
                    new Select(false,
                        Arrays.asList(new Projection(ExpressionParserTest.wildcard(), null)),
                        Arrays.asList(table("t1")),
                        null, null, null), Op.EXISTS), number(1), null),
                    null)),
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

  }

  @Test
  public void testExists() {
    assertParser(ExpressionParser.exists(RelationParser.TABLE), "exists t",
        new UnaryRelationalExpression(table("t"), Op.EXISTS));
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

  }

  @Test
  public void testNotExists() {
    assertParser(ExpressionParser.notExists(RelationParser.TABLE), "not exists t",
        new UnaryRelationalExpression(table("t"), Op.NOT_EXISTS));
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

    assertParser(parser, "(1 < 2 or not exists t)",
        new BinaryExpression(
            new BinaryExpression(number(1), Op.LT, number(2)),
            Op.OR,
            new UnaryExpression(Op.NOT,
                new UnaryRelationalExpression(table("t"), Op.EXISTS))
        )
    );
  }
View Full Code Here

Examples of org.codehaus.jparsec.examples.sql.ast.UnaryRelationalExpression

            new BinaryExpression(ExpressionParserTest.name("x"), Op.GT, number(1)), null, null));
    assertParser(parser, "select 1 from t where exists (select * from t2)",
        new Select(false,
            Arrays.asList(new Projection(number(1), null)),
            Arrays.asList(table("t")),
            new UnaryRelationalExpression(
                new Select(false,
                    Arrays.asList(new Projection(ExpressionParserTest.wildcard(), null)),
                    Arrays.asList(table("t2")),
                    null, null, null),
                Op.EXISTS), null, null));
    assertParser(parser, "select case when exists (select * from t1) then 1 end from t",
        new Select(false,
            Arrays.asList(new Projection(
                ExpressionParserTest.fullCase(new UnaryRelationalExpression(
                    new Select(false,
                        Arrays.asList(new Projection(ExpressionParserTest.wildcard(), null)),
                        Arrays.asList(table("t1")),
                        null, null, null), Op.EXISTS), number(1), null),
                    null)),
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.