public class ParserUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ParserUtils.ExpressionType |
Modifier and Type | Method and Description |
---|---|
static void |
checkErrors(PlsqlRoot root,
java.lang.String sql)
Deprecated.
|
static java.util.Collection<java.lang.String[]> |
getColumnNames(SqlExpression sqlExpression)
Deprecated.
|
static java.util.Collection<java.lang.String[]> |
getColumnNames(SQLFragment sqlFragment) |
static java.util.Collection<java.lang.String[]> |
getColumnNames(java.lang.String expression,
ParserUtils.ExpressionType type)
Deprecated.
Use
#getColumnNames(String, ExpressionType, DBObjectProvider, Relation)
instead.
Returns a Collection of names of the columns used in expression
of SqlDriver type type .
The names are stored as an array of name components. The meaning of the
components depends upon the context in which the name is used. For example,
the name A.B in a select list would mean table.column, but in a constraint
or index context, it would mean column.attribute as table.column is invalid
in such a context. |
static java.util.Collection<java.lang.String[]> |
getColumnNames(java.lang.String expression,
SQLFragmentExpressionBuilder.ExpressionType type,
DBObjectProvider prov,
Relation rel)
Returns a Collection of names of the columns used in
expression . |
static java.lang.String |
getConstant(PlsqlNode node)
Deprecated.
|
static java.lang.String |
getConstant(SQLFragment frag)
Returns the value of a constant fragment, or null if frag
isn't a constant.
|
static java.lang.String |
getHexToRawString(PlsqlNode node)
Deprecated.
|
static java.lang.String |
getHexToRawString(SQLFragment frag)
Get hextoraw String.
|
static java.lang.String |
getString(PlsqlNode node)
Deprecated.
|
static java.lang.String |
getString(SQLFragment frag)
Get a String constant.
|
static boolean |
isAllowedExpression(PlsqlNode node,
java.util.Collection validOperators)
Deprecated.
|
static boolean |
isAllowedExpression(SQLFragment frag,
java.util.Collection<java.lang.String> validOperators)
Is this one of the allowed expression fragments?
The name of the fragment operation is compared to the collection
of valid operators.
|
static boolean |
isAllowedStringType(PlsqlNode node,
java.util.Collection validStringTypes)
Deprecated.
|
static boolean |
isConstant(PlsqlNode node)
Deprecated.
use
isConstant( SQLFragment )
Is this a non null string or numeric constant |
static boolean |
isConstant(SQLFragment frag)
Could this be a non null string or numeric constant.
|
static boolean |
isDbObjectName(PlsqlNode node)
Deprecated.
|
static boolean |
isNull(PlsqlNode node)
Deprecated.
|
static PlsqlRoot |
parseQueryString(java.lang.String expression,
int type)
Deprecated.
|
public static java.lang.String getHexToRawString(SQLFragment frag)
@Deprecated public static java.lang.String getHexToRawString(PlsqlNode node)
public static java.lang.String getString(SQLFragment frag)
@Deprecated public static java.lang.String getString(PlsqlNode node)
public static boolean isAllowedExpression(SQLFragment frag, java.util.Collection<java.lang.String> validOperators)
frag
- an expressionvalidOperators
- operation names@Deprecated public static boolean isAllowedExpression(PlsqlNode node, java.util.Collection validOperators)
@Deprecated public static boolean isAllowedStringType(PlsqlNode node, java.util.Collection validStringTypes)
public static boolean isConstant(SQLFragment frag)
@Deprecated public static boolean isConstant(PlsqlNode node)
isConstant( SQLFragment )
Is this a non null string or numeric constant@Deprecated public static boolean isNull(PlsqlNode node)
@Deprecated public static boolean isDbObjectName(PlsqlNode node)
public static java.lang.String getConstant(SQLFragment frag)
@Deprecated public static java.lang.String getConstant(PlsqlNode node)
getConstant( SQLFragment )
public static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression, SQLFragmentExpressionBuilder.ExpressionType type, DBObjectProvider prov, Relation rel) throws SQLQueryException
expression
.
Expression is either a select list item
SQLFragmentExpressionBuilder.ExpressionType.ITEM or a condition
SQLFragmentExpressionBuilder.ExpressionType.CONDITION
expression
- the arithmetic expression to be parsed for column namestype
- an expression type defined in oracle.javatools.parser.plsql.syntax.SqlDriverSQLQueryException
- when there are errors in expression
public static java.util.Collection<java.lang.String[]> getColumnNames(SQLFragment sqlFragment)
@Deprecated public static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression, ParserUtils.ExpressionType type) throws SQLQueryException
#getColumnNames(String, ExpressionType, DBObjectProvider, Relation)
instead.
Returns a Collection of names of the columns used in expression
of SqlDriver type type
.
The names are stored as an array of name components. The meaning of the
components depends upon the context in which the name is used. For example,
the name A.B in a select list would mean table.column, but in a constraint
or index context, it would mean column.attribute as table.column is invalid
in such a context.expression
- the arithmetic expression to be parsed for column namestype
- an expression type defined in oracle.javatools.parser.plsql.syntax.SqlDriverSQLQueryException
- when there are errors in expression
@Deprecated public static java.util.Collection<java.lang.String[]> getColumnNames(SqlExpression sqlExpression)
sqlExpression
- the SqlExpression to be searched for column names@Deprecated public static void checkErrors(PlsqlRoot root, java.lang.String sql) throws SQLQueryException
root
- sql
- SQLQueryException
@Deprecated public static PlsqlRoot parseQueryString(java.lang.String expression, int type) throws SQLQueryException
expression
- type
- SqlDriver type eg SqlDriver.INPUT_AEXSQLQueryException