Package com.alvazan.orm.parser.antlr

Examples of com.alvazan.orm.parser.antlr.ExpressionNode


  }
 
  private DirectCursor<IndexColumnInfo> processRangeExpression(ExpressionNode root, Set<ViewInfo> alreadyJoinedViews) {
    StateAttribute attr;
    if(root.getType() == NoSqlLexer.BETWEEN) {
      ExpressionNode grandChild = root.getChild(ChildSide.LEFT).getChild(ChildSide.LEFT);
      attr = (StateAttribute) grandChild.getState();
    } else if (root.getType() == NoSqlLexer.IN) {
      ExpressionNode grandChild = root.getChild(ChildSide.LEFT);
      attr = (StateAttribute) grandChild.getState();
    } else {
      attr = (StateAttribute) root.getChild(ChildSide.LEFT).getState();
    }
   
    DboColumnMeta info = attr.getColumnInfo();
View Full Code Here


        || root.getType() == NoSqlLexer.LE
        || root.isBetweenExpression()) {
      Key from = null;
      Key to = null;
      if(root.isBetweenExpression()) {
        ExpressionNode node = root.getGreaterThan();
        ExpressionNode node2 = root.getLessThan();
        from = createLeftKey(node, info);
        to = createRightKey(node2, info);
      } else if(root.getType() == NoSqlLexer.GT
          || root.getType() == NoSqlLexer.GE) {
        from = createLeftKey(root, info);
View Full Code Here

    DirectCursor<IndexColumnInfo> cursor = getResultListImpl(alreadyJoinedViews, indexedColumn);
    return cursor;
  }
 
  public DirectCursor<IndexColumnInfo> getResultListImpl(Set<ViewInfo> alreadyJoinedViews, String indexedColumn) {
    ExpressionNode root = spiMeta.getASTTree();
    if(root == null) {
      ViewInfoImpl tableInfo = (ViewInfoImpl) spiMeta.getTargetViews().get(0);
      DboTableMeta tableMeta = tableInfo.getTableMeta();
      DboColumnMeta metaCol = tableMeta.getAnyIndex(indexedColumn);
      ScanInfo scanInfo = createScanInfo(tableInfo, metaCol);
View Full Code Here

      throw new UnsupportedOperationException("bug, unsupported type="+type);
    }
  }

  private DirectCursor<IndexColumnInfo> processAndOr(ExpressionNode root, Set<ViewInfo> alreadyJoinedViews) {
    ExpressionNode left = root.getChild(ChildSide.LEFT);
    ExpressionNode right = root.getChild(ChildSide.RIGHT);
   
    DirectCursor<IndexColumnInfo> leftResults = processExpressionTree(left, alreadyJoinedViews);
    DirectCursor<IndexColumnInfo> rightResults = processExpressionTree(right, alreadyJoinedViews);
   
    JoinMeta joinMeta = left.getJoinMeta();
    ViewInfo leftView = joinMeta.getPrimaryJoinInfo().getPrimaryTable();
    JoinMeta joinMeta2 = right.getJoinMeta();
    ViewInfo rightView = joinMeta2.getPrimaryJoinInfo().getPrimaryTable();
   
    JoinType joinType = root.getJoinMeta().getJoinType();
    if(joinType == JoinType.INNER || joinType == JoinType.LEFT_OUTER) {
      //We need to proxy the right results to translate to the same primary key as the
View Full Code Here

  }
 
  private DirectCursor<IndexColumnInfo> processRangeExpression(ExpressionNode root, Set<ViewInfo> alreadyJoinedViews) {
    StateAttribute attr;
    if(root.getType() == NoSqlLexer.BETWEEN) {
      ExpressionNode grandChild = root.getChild(ChildSide.LEFT).getChild(ChildSide.LEFT);
      attr = (StateAttribute) grandChild.getState();
    } else if (root.getType() == NoSqlLexer.IN) {
      ExpressionNode grandChild = root.getChild(ChildSide.LEFT);
      attr = (StateAttribute) grandChild.getState();
    } else {
      attr = (StateAttribute) root.getChild(ChildSide.LEFT).getState();
    }
   
    DboColumnMeta info = attr.getColumnInfo();
View Full Code Here

        || root.getType() == NoSqlLexer.LE
        || root.isBetweenExpression()) {
      Key from = null;
      Key to = null;
      if(root.isBetweenExpression()) {
        ExpressionNode node = root.getGreaterThan();
        ExpressionNode node2 = root.getLessThan();
        from = createLeftKey(node, info);
        to = createRightKey(node2, info);
      } else if(root.getType() == NoSqlLexer.GT
          || root.getType() == NoSqlLexer.GE) {
        from = createLeftKey(root, info);
View Full Code Here

TOP

Related Classes of com.alvazan.orm.parser.antlr.ExpressionNode

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.