Package net.sf.jsqlparser.statement.select

Examples of net.sf.jsqlparser.statement.select.FromItem


      buffer.append("JOIN ");

    }
   
    FromItem fromItem = join.getRightItem();
    fromItem.accept(this);
    if (join.getOnExpression() != null) {
      buffer.append(" ON ");
      join.getOnExpression().accept(expressionVisitor);
    }
    if (join.getUsingColumns() != null) {
View Full Code Here


  }

  final public PlainSelect PlainSelect() throws ParseException {
        PlainSelect plainSelect = new PlainSelect();
        List selectItems = null;
        FromItem fromItem = null;
        List joins = null;
        List distinctOn = null;
        Expression where = null;
        List orderByElements;
        List groupByColumnReferences = null;
View Full Code Here

      Table();
    }
  }

  final public FromItem FromItem() throws ParseException {
        FromItem fromItem = null;
        String alias = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 79:
      jj_consume_token(79);
      if (jj_2_7(2147483647)) {
        fromItem = SubJoin();
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case K_SELECT:
        case 79:
          fromItem = SubSelect();
          break;
        default:
          jj_la1[55] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
      jj_consume_token(80);
      break;
    case S_IDENTIFIER:
    case S_QUOTED_IDENTIFIER:
      fromItem = Table();
      break;
    default:
      jj_la1[56] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case S_IDENTIFIER:
    case S_QUOTED_IDENTIFIER:
      alias = Alias();
                         fromItem.setAlias(alias);
      break;
    default:
      jj_la1[57] = jj_gen;
      ;
    }
View Full Code Here

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

  final public FromItem SubJoin() throws ParseException {
        FromItem fromItem = null;
        Join join = null;
        SubJoin subJoin = new SubJoin();
    fromItem = FromItem();
                              subJoin.setLeft(fromItem);
    join = JoinerExpression();
View Full Code Here

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

  final public Join JoinerExpression() throws ParseException {
        Join join = new Join();
        FromItem right = null;
        Expression onExpression = null;
        Column tableColumn;
        List columns = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_LEFT:
View Full Code Here

    }

    private Map<String, Table> extractTableAliases(List<FromItem> fromItems) {
        Map<String, Table> aliases = new HashMap<String, Table>();
        for (Iterator<FromItem> it = fromItems.iterator(); it.hasNext();) {
            FromItem fromItem = it.next();
            if (fromItem instanceof Table) {
                Table table = (Table) fromItem;
                String alias = table.getAlias();
                if (alias != null) {
                    aliases.put(alias, table);
View Full Code Here

    private List<FromItem> removeTableAliases(final List<FromItem> fromItems) {
        List<FromItem> items = new ArrayList<FromItem>(fromItems);

        for (Iterator<FromItem> it = items.iterator(); it.hasNext();) {

            FromItem fromItem = it.next();

            if (fromItem instanceof Table) {
                Table table = (Table) fromItem;
                table.setAlias(null);
            }
View Full Code Here

        }

        List<FromItem> qualifiedFromItems = new ArrayList<FromItem>();

        for (Iterator it = fromItems.iterator(); it.hasNext();) {
            FromItem fromItem = (FromItem) it.next();

            FromItem qualifiedItem = FromItemQualifier.qualify(session, fromItem);

            qualifiedFromItems.add(qualifiedItem);
        }

        return qualifiedFromItems;
View Full Code Here

        }

        List tableNames = new ArrayList(fromItems.size());

        for (Iterator it = fromItems.iterator(); it.hasNext();) {
            FromItem fromItem = (FromItem) it.next();
            String fromItemDef = fromItem.toString();
            tableNames.add(fromItemDef);
        }
        return (String[]) tableNames.toArray(new String[tableNames.size()]);
    }
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.statement.select.FromItem

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.