|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.sql.ParserUtils
public class ParserUtils
Nested Class Summary | |
---|---|
static class |
ParserUtils.ExpressionType |
Method Summary | |
---|---|
static void |
checkErrors(PlsqlRoot root, java.lang.String sql) Convert parser errors into a SQLQueryException |
static java.util.Collection<java.lang.String[]> |
getColumnNames(SqlExpression sqlExpression) Returns a Collection of names of the columns used in sqlExpression The names are stored as an array of name components. |
static java.util.Collection<java.lang.String[]> |
getColumnNames(java.lang.String expression, ParserUtils.ExpressionType type) Returns a Collection of names of the columns used in expression of SqlDriver type type . |
static java.lang.String |
getConstant(PlsqlNode node) Returns the value of a string constant node(STRTCONS), or null if node isn't an instanceof SqlStrdef. |
static java.lang.String |
getHexToRawString(PlsqlNode node) Get hextoraw String. |
static java.lang.String |
getString(PlsqlNode node) Get a String constant. |
static boolean |
isAllowedExpression(PlsqlNode node, java.util.List validOperators) Is this one of the allowed expression nodes |
static boolean |
isAllowedStringType(PlsqlNode node, java.util.List validStringTypes) Is this one of the allowed String nodes |
static boolean |
isConstant(PlsqlNode node) Is this a non null string or numeric constant |
static boolean |
isDbObjectName(PlsqlNode node) Is this a database object name. |
static boolean |
isNull(PlsqlNode node) Is this the value NULL |
static PlsqlRoot |
parseQueryString(java.lang.String expression, int type) Parse an SQL expression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getHexToRawString(PlsqlNode node)
public static java.lang.String getString(PlsqlNode node)
public static boolean isAllowedExpression(PlsqlNode node, java.util.List validOperators)
public static boolean isAllowedStringType(PlsqlNode node, java.util.List validStringTypes)
public static boolean isConstant(PlsqlNode node)
public static boolean isNull(PlsqlNode node)
public static boolean isDbObjectName(PlsqlNode node)
public static java.lang.String getConstant(PlsqlNode node)
public static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression, ParserUtils.ExpressionType type) throws SQLQueryException
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
public static void checkErrors(PlsqlRoot root, java.lang.String sql) throws SQLQueryException
root
-sql
-SQLQueryException
public static java.util.Collection<java.lang.String[]> getColumnNames(SqlExpression sqlExpression)
sqlExpression
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.sqlExpression
- the SqlExpression to be searched for column namespublic static PlsqlRoot parseQueryString(java.lang.String expression, int type) throws SQLQueryException
expression
-type
- SqlDriver type eg SqlDriver.INPUT_AEXSQLQueryException
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |