Examples of checkQueryFails()


Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

  /** Tests using case-insensitive matching of table names. */
  @Test public void testCaseInsensitiveTables() {
    final SqlTester tester1 = tester.withLex(Lex.SQL_SERVER);
    tester1.checkQuery("select eMp.* from (select * from emp) as EmP");
    tester1.checkQueryFails("select ^eMp^.* from (select * from emp as EmP)",
        "Unknown identifier 'eMp'");
    tester1.checkQuery("select eMp.* from (select * from emP) as EmP");
    tester1.checkQuery("select eMp.empNo from (select * from emP) as EmP");
    tester1.checkQuery("select empNo from (select Empno from emP) as EmP");
    tester1.checkQuery("select empNo from (select Empno from emP)");
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    final SqlTester tester1 = tester.withQuoting(Quoting.BRACKET);
    tester1.checkResultType(
        "select [e].EMPNO from [EMP] as [e]",
        "RecordType(INTEGER NOT NULL EMPNO) NOT NULL");

    tester1.checkQueryFails(
        "select ^e^.EMPNO from [EMP] as [e]",
        "Table 'E' not found");

    tester1.checkQueryFails(
        "select ^x^ from (\n"
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    tester1.checkQueryFails(
        "select ^e^.EMPNO from [EMP] as [e]",
        "Table 'E' not found");

    tester1.checkQueryFails(
        "select ^x^ from (\n"
        + "  select [e].EMPNO as [x] from [EMP] as [e])",
        "Column 'X' not found in any table");

    tester1.checkQueryFails(
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    tester1.checkQueryFails(
        "select ^x^ from (\n"
        + "  select [e].EMPNO as [x] from [EMP] as [e])",
        "Column 'X' not found in any table");

    tester1.checkQueryFails(
        "select EMP.^\"x\"^ from EMP",
        "(?s).*Encountered \"\\. \\\\\"\" at line .*");

    tester1.checkResultType(
        "select [x[y]] z ] from (\n"
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    final SqlTester tester1 = tester.withLex(Lex.JAVA);
    tester1.checkResultType(
        "select e.EMPNO from EMP as e",
        "RecordType(INTEGER NOT NULL EMPNO) NOT NULL");

    tester1.checkQueryFails(
        "select ^e^.EMPNO from EMP as E",
        "Table 'e' not found");

    tester1.checkQueryFails(
        "select ^E^.EMPNO from EMP as e",
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    tester1.checkQueryFails(
        "select ^e^.EMPNO from EMP as E",
        "Table 'e' not found");

    tester1.checkQueryFails(
        "select ^E^.EMPNO from EMP as e",
        "Table 'E' not found");

    tester1.checkQueryFails(
        "select ^x^ from (\n"
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    tester1.checkQueryFails(
        "select ^E^.EMPNO from EMP as e",
        "Table 'E' not found");

    tester1.checkQueryFails(
        "select ^x^ from (\n"
        + "  select e.EMPNO as X from EMP as e)",
        "Column 'x' not found in any table");

    // double-quotes are not valid in this lexical convention
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

        "select ^x^ from (\n"
        + "  select e.EMPNO as X from EMP as e)",
        "Column 'x' not found in any table");

    // double-quotes are not valid in this lexical convention
    tester1.checkQueryFails(
        "select EMP.^\"x\"^ from EMP",
        "(?s).*Encountered \"\\. \\\\\"\" at line .*");

    // in Java mode, creating identifiers with spaces is not encouraged, but you
    // can use back-ticks if you really have to
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

        false);
    tester1.checkFails(
        "select t.^PATH^ from (select 1 as path from (values (true))) as t",
        "Column 'PATH' not found in table 't'",
        false);
    tester1.checkQueryFails(
        "select t.x, t.^PATH^ from (values (true, 1)) as t(path, x)",
        "Column 'PATH' not found in table 't'");

    // Built-in functions can be written in any case, even those with no args,
    // and regardless of spaces between function name and open parenthesis.
View Full Code Here

Examples of org.eigenbase.sql.test.SqlTester.checkQueryFails()

    // correlating variable
    tester1.checkQuery(
        "select * from emp as [e] where exists (\n"
        + "select 1 from dept where dept.deptno = [E].deptno)");
    tester2.checkQueryFails(
        "select * from emp as [e] where exists (\n"
        + "select 1 from dept where dept.deptno = ^[E]^.deptno)",
        "(?s).*Table 'E' not found");

    checkFails("select count(1), ^empno^ from emp",
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.