public class JCRSQLQueryBuilder extends Object implements JCRSQLParserVisitor
public static QueryRootNode createQuery(String statement, NameResolver resolver, QueryNodeFactory factory) throws InvalidQueryException
QueryNode
tree from a SQL statement
using the passed query node factory
.statement
- the SQL statement.resolver
- the namespace resolver to use.QueryNode
tree.InvalidQueryException
- if statement
is malformed.public static String toString(QueryRootNode root, NameResolver resolver) throws InvalidQueryException
root
- the root of the query node tree.resolver
- to resolve QNames.InvalidQueryException
- if the query node tree cannot be converted
into a String representation due to restrictions in SQL.public Object visit(SimpleNode node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTQuery node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTSelectList node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTFromClause node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTWhereClause node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTPredicate node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTOrExpression node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTAndExpression node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTNotExpression node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTBracketExpression node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTLiteral node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTIdentifier node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTOrderByClause node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTOrderSpec node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTAscendingOrderSpec node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTDescendingOrderSpec node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTContainsExpression node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTLowerFunction node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTUpperFunction node, Object data)
visit
in interface JCRSQLParserVisitor
public Object visit(ASTExcerptFunction node, Object data)
visit
in interface JCRSQLParserVisitor
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.