Package net.sf.jsqlparser.schema

Examples of net.sf.jsqlparser.schema.Table


      {if (true) return tk.image;}
    throw new Error("Missing return statement in function");
  }

  final public Table TableWithAlias() throws ParseException {
        Table table = null;
        String alias = null;
    table = Table();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case S_IDENTIFIER:
    case S_QUOTED_IDENTIFIER:
      alias = Alias();
                                       table.setAlias(alias);
      break;
    default:
      jj_la1[20] = jj_gen;
      ;
    }
View Full Code Here


          {if (true) return table;}
    throw new Error("Missing return statement in function");
  }

  final public Table Table() throws ParseException {
        Table table = null;
        String name1 = null;
        String name2 = null;
    if (jj_2_4(3)) {
      name1 = RelObjectName();
      jj_consume_token(81);
      name2 = RelObjectName();
                                                                   table = new Table(name1, name2);
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case S_IDENTIFIER:
      case S_QUOTED_IDENTIFIER:
        name1 = RelObjectName();
                                        table = new Table(null, name1);
        break;
      default:
        jj_la1[21] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
View Full Code Here

                {if (true) return selectItem;}
    throw new Error("Missing return statement in function");
  }

  final public AllTableColumns AllTableColumns() throws ParseException {
        Table table = null;
    table = Table();
    jj_consume_token(81);
    jj_consume_token(82);
                {if (true) return new AllTableColumns(table);}
    throw new Error("Missing return statement in function");
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  final public CreateTable CreateTable() throws ParseException {
        CreateTable createTable = new CreateTable();
        Table table = null;
        ArrayList columnDefinitions = new ArrayList();
        List columnSpecs = null;
        List tableOptions = new ArrayList();
        Token columnName;
        Token tk = null;
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  final public Truncate Truncate() throws ParseException {
        Truncate truncate = new Truncate();
        Table table;
    jj_consume_token(K_TRUNCATE);
    jj_consume_token(K_TABLE);
    table = Table();
                        truncate.setTable(table);
                {if (true) return truncate;}
View Full Code Here

  public void testAddJoin() throws JSQLParserException {
    Select select = (Select)CCJSqlParserUtil.parse("select a from mytable");
    final EqualsTo equalsTo = new EqualsTo();
    equalsTo.setLeftExpression(new Column("a"));
    equalsTo.setRightExpression(new Column("b"));
    Join addJoin = SelectUtils.addJoin(select, new Table("mytable2"), equalsTo);
    addJoin.setLeft(true);
    assertEquals("SELECT a FROM mytable LEFT JOIN mytable2 ON a = b", select.toString());
  }
View Full Code Here

    assertEquals("SELECT a FROM mytable LEFT JOIN mytable2 ON a = b", select.toString());
  }
 
  @Test
  public void testBuildSelectFromTableAndExpressions() {
    Select select = SelectUtils.buildSelectFromTableAndExpressions(new Table("mytable"), new Column("a"), new Column("b"));
    assertEquals("SELECT a, b FROM mytable", select.toString());
  }
View Full Code Here

    assertEquals("SELECT a, b FROM mytable", select.toString());
  }
 
  @Test
  public void testBuildSelectFromTable() {
    Select select = SelectUtils.buildSelectFromTable(new Table("mytable"));
    assertEquals("SELECT * FROM mytable", select.toString());
  }
View Full Code Here

    assertEquals("SELECT * FROM mytable", select.toString());
  }
 
  @Test
  public void testBuildSelectFromTableAndParsedExpression() throws JSQLParserException {
    Select select = SelectUtils.buildSelectFromTableAndExpressions(new Table("mytable"), "a+b", "test");
    assertEquals("SELECT a + b, test FROM mytable", select.toString());
   
    assertTrue(((SelectExpressionItem)((PlainSelect)select.getSelectBody()).getSelectItems().get(0)).getExpression() instanceof Addition);
  }
View Full Code Here

    }

    public void visit(AllTableColumns allTableColumns) {
        AllTableColumns qualified = new AllTableColumns();

        Table qt = allTableColumns.getTable();
        Table unaliasedTable = (Table) tableAliases.get(qt.getName());

        if (unaliasedTable == null) {
            // not an aliased table, qualify it
            qt = TableQualifier.qualify(session, allTableColumns.getTable());
        } else {
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.schema.Table

Copyright © 2018 www.massapicom. 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.