当前位置: 首页>>代码示例>>Java>>正文


Java PlainSelect.getOracleHierarchical方法代码示例

本文整理汇总了Java中net.sf.jsqlparser.statement.select.PlainSelect.getOracleHierarchical方法的典型用法代码示例。如果您正苦于以下问题:Java PlainSelect.getOracleHierarchical方法的具体用法?Java PlainSelect.getOracleHierarchical怎么用?Java PlainSelect.getOracleHierarchical使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.jsqlparser.statement.select.PlainSelect的用法示例。


在下文中一共展示了PlainSelect.getOracleHierarchical方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect plainSelect) {
    if (plainSelect.getSelectItems() != null) {
        for (SelectItem item : plainSelect.getSelectItems()) {
            item.accept(this);
        }
    }

    if (plainSelect.getFromItem() != null) {
        plainSelect.getFromItem().accept(this);
    }

    if (plainSelect.getJoins() != null) {
        for (Join join : plainSelect.getJoins()) {
            join.getRightItem().accept(this);
        }
    }
    if (plainSelect.getWhere() != null) {
        plainSelect.getWhere().accept(this);
    }
    if (plainSelect.getOracleHierarchical() != null) {
        plainSelect.getOracleHierarchical().accept(this);
    }
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:25,代码来源:TablesNamesFinder.java

示例2: visit

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect ps) {
    
    ps.getFromItem().accept(this);
    
    if (ps.getJoins() != null) {
        for (Join j : ps.getJoins()) {
            j.getRightItem().accept(this);
        }
    }

    if (ps.getWhere() != null) {
        ps.getWhere().accept(this);
    }
    
    if (ps.getOracleHierarchical() != null) {
        ps.getOracleHierarchical().accept(this);
    }

}
 
开发者ID:valdasraps,项目名称:resthub,代码行数:21,代码来源:UpdateSelectParser.java

示例3: plainSelectToStringAppendWithNoLock

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
private static String plainSelectToStringAppendWithNoLock(PlainSelect plain) {
    StringBuilder sql = new StringBuilder("SELECT ");
    if (plain.getDistinct() != null)
        sql.append(plain.getDistinct()).append(" ");

    if (plain.getTop() != null)
        sql.append(plain.getTop()).append(" ");

    sql.append(PlainSelect.getStringList(plain.getSelectItems()));
    if (plain.getFromItem() != null) {
        sql.append(" FROM ").append(plain.getFromItem()).append(" WITH (NOLOCK) ");
        if (plain.getJoins() != null) {
            Iterator<Join> it = plain.getJoins().iterator();
            while (it.hasNext()) {
                Join join = it.next();
                if (join.isSimple()) {
                    sql.append(", ").append(join).append(" WITH (NOLOCK) ");
                } else {
                    String temp = join.toString().replace(join.getRightItem().toString(),
                            join.getRightItem().toString() + " WITH (NOLOCK) ");
                    sql.append(" ").append(temp);
                }
            }
        }

        if (plain.getWhere() != null)
            sql.append(" WHERE ").append(plain.getWhere());

        if (plain.getOracleHierarchical() != null)
            sql.append(plain.getOracleHierarchical().toString());

        sql.append(PlainSelect.getFormatedList(plain.getGroupByColumnReferences(), "GROUP BY"));
        if (plain.getHaving() != null)
            sql.append(" HAVING ").append(plain.getHaving());

        sql.append(PlainSelect.orderByToString(plain.isOracleSiblings(), plain.getOrderByElements()));
        if (plain.getLimit() != null)
            sql.append(plain.getLimit());

    }
    return sql.toString();
}
 
开发者ID:ctripcorp,项目名称:dal,代码行数:43,代码来源:SqlBuilder.java

示例4: visit

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect ps) {

    // First collect FROM and JOIN items
    
    ps.getFromItem().accept(this);
    
    if (ps.getJoins() != null) {
        for (Join j : ps.getJoins()) {
            j.getRightItem().accept(this);
            if (j.getOnExpression() != null) {
                j.getOnExpression().accept(this);
            }
            if (j.getUsingColumns() != null) {
                for (Iterator it1 = j.getUsingColumns().iterator(); it1.hasNext();) {
                    ((Expression) it1.next()).accept(this);
                }
            }
        }
    }
    
   // Next iterate over SELECT, WHERE and ORDER BY items
    
    for (Iterator it = ps.getSelectItems().iterator(); it.hasNext();) {
        Object o = it.next();
        if (o instanceof SelectExpressionItem) {
            ((SelectExpressionItem) o).accept(this);
        }
        if (o instanceof AllColumns) {
            ((AllColumns) o).accept(this);
        }
        if (o instanceof AllTableColumns) {
            ((AllTableColumns) o).accept(this);
        }
    }

    if (ps.getWhere() != null) {
        ps.getWhere().accept(this);
    }
    
    if (ps.getOrderByElements() != null) {
        for (Iterator it = ps.getOrderByElements().iterator(); it.hasNext();) {
            ((OrderByElement) it.next()).accept(this);
        }
    }
    
    if (ps.getOracleHierarchical() != null) {
        ps.getOracleHierarchical().accept(this);
    }
    
}
 
开发者ID:valdasraps,项目名称:resthub,代码行数:52,代码来源:SqlParser.java

示例5: visit

import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
/**
 * SelectVisitor
 * @param ps
 */
@Override
public void visit(PlainSelect ps) {
    
    // First collect FROM and JOIN items
    
    ps.getFromItem().accept(this);
    
    if (ps.getJoins() != null) {
        for (Join j : ps.getJoins()) {
            j.getRightItem().accept(this);
            if (j.getOnExpression() != null) {
                j.getOnExpression().accept(expParser);
            }
            if (j.getUsingColumns() != null) {
                for (Iterator<?> it1 = j.getUsingColumns().iterator(); it1.hasNext();) {
                    ((Expression) it1.next()).accept(expParser);
                }
            }
        }
    }
    
   // Next iterate over SELECT, WHERE and ORDER BY items
    
    for (Object o: ps.getSelectItems()) {
        if (o instanceof SelectExpressionItem) {
            ((SelectExpressionItem) o).accept(this);
        }
        if (o instanceof AllColumns) {
            ((AllColumns) o).accept(this);
        }
        if (o instanceof AllTableColumns) {
            ((AllTableColumns) o).accept(this);
        }
    }

    if (ps.getWhere() != null) {
        ps.getWhere().accept(expParser);
    }
    
    if (ps.getOrderByElements() != null) {
        for (Iterator<?> it = ps.getOrderByElements().iterator(); it.hasNext();) {
            ((OrderByElement) it.next()).accept(this);
        }
    }
    
    if (ps.getOracleHierarchical() != null) {
        ps.getOracleHierarchical().accept(expParser);
    }
    
}
 
开发者ID:valdasraps,项目名称:resthub,代码行数:55,代码来源:CheckSelectParser.java


注:本文中的net.sf.jsqlparser.statement.select.PlainSelect.getOracleHierarchical方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。