|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TExpression
public class TExpression
An expression is a combination of one or more values, operators, and SQL functions that evaluates to a value. There are lots of types of expression in this SQL parser, expressionType is used to distinguish these types.
expressionType | Operand |
---|---|
absoluteValue | TExpression getRightOperand() |
arrayConstructor | TSelectSqlStatement getSubQuery() |
arrayConstructor | TExpressionList getExprList() |
arrayConstructor | NULL |
arrayaccess | N/A |
ASSIGNMENT | TExpression getLeftOperand(), TExpression getRightOperand() |
at_local | TExpression getLeftOperand() |
at_time_zone | TExpression getLeftOperand(), TExpression getRightOperand() |
between_conditions | TExpression getBetweenOperand(),TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_AND | TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_EXCLUSIVE_OR | TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_NOT | TExpression getRightOperand() |
BITWISE_OR | TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_SHIFT_LEFT | TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_SHIFT_RIGHT | TExpression getLeftOperand(), TExpression getRightOperand() |
BITWISE_XOR | TExpression getLeftOperand(), TExpression getRightOperand() |
caseExprOperator | TCaseExpression getCaseExpression() |
COLLATE | TExpression getLeftOperand(), TExpression getRightOperand() |
compoundAssignment | TExpression getLeftOperand(), TExpression getRightOperand() |
compoundParenthesis | TExpression getLeftOperand() |
compoundPrior | TExpression getRightOperand() |
compoundUnaryBitwiseNot | TExpression getRightOperand() |
compoundUnaryMinus | TExpression getRightOperand() |
compoundUnaryPlus | TExpression getRightOperand() |
CONCATENATE | TExpression getLeftOperand(), TExpression getRightOperand() |
connect_by_root | TExpression getRightOperand() |
cubeRoot | TExpression getRightOperand() |
cursorExprOperator | TSelectSqlStatement getSubQuery() |
datetimeExprOperator | N/A |
day_to_second | TExpression getLeftOperand() |
DIVIDE | TExpression getLeftOperand(), TExpression getRightOperand() |
exists_condition | TSelectSqlStatement getSubQuery() |
EXPONENTIATE | TExpression getLeftOperand(), TExpression getRightOperand() |
expr_list | TExpressionList getExprList() |
factorial | TExpression getLeftOperand() |
factorialPrefix | TExpression getRightOperand() |
fieldSelection | TObjectName getFieldName() |
floating_point_conditions | TExpression getLeftOperand() |
funcationCallOperator | TFunctionCall getFunctionCall() |
group_comparison_conditions | TExpression getLeftOperand(), TInExpr getInExpr() |
in_conditions | TExpression getLeftOperand(),TExpression getRightOperand() |
in_expr | TInExpr getInExpr() |
intervalExprOperator | N/A |
interval_expression | TIntervalExpression getIntervalExpr() |
is_distinct_from | TExpression getLeftOperand(), TExpression getRightOperand() |
is_document | TExpression getLeftOperand() |
isoftype_condition | TExpression getLeftOperand() |
left_shift | TExpression getLeftOperand(), TExpression getRightOperand() |
LEFTJOIN_OP | TExpression getLeftOperand(), TExpression getRightOperand() |
logical_conditions_and | TExpression getLeftOperand(), TExpression getRightOperand() |
logical_conditions_is | N/A |
logical_conditions_not | TExpression getRightOperand() |
logical_conditions_or | TExpression getLeftOperand(), TExpression getRightOperand() |
member_of | TExpression getLeftOperand(), TExpression getRightOperand() |
MINUS | TExpression getLeftOperand(), TExpression getRightOperand() |
modelExprOperator | N/A |
MODULO | TExpression getLeftOperand(), TExpression getRightOperand() |
multisetExprOperator | TSelectSqlStatement getSubQuery() |
mysql_binary_operator | TExpression getRightOperand() |
new_structured_type | TFunctionCall getFunctionCall() |
new_variant_type | TNewVariantTypeArgumentList getNewVariantTypeArgumentList() |
null_conditions | TExpression getLeftOperand() |
objectaccessExprOperator | N/A |
pattern_matching_conditions | TExpression getLeftOperand(), TExpression getRightOperand() |
pattern_matching_conditions | TExpression getLeftOperand(), TExpression getRightOperand(),TExpression getLikeEscapeOperand() |
patternMatchingExprOperator | N/A |
period_ldiff | TExpression getLeftOperand(), TExpression getRightOperand() |
period_p_intersect | TExpression getLeftOperand(), TExpression getRightOperand() |
period_p_normalize | TExpression getLeftOperand(), TExpression getRightOperand() |
period_rdiff | TExpression getLeftOperand(), TExpression getRightOperand() |
placeholderExprOperator | N/A |
PLUS | TExpression getLeftOperand(), TExpression getRightOperand() |
POWER | N/A |
RANGE | N/A |
ref_arrow | TExpression getLeftOperand(), TExpression getRightOperand() |
right_shift | TExpression getLeftOperand(), TExpression getRightOperand() |
RIGHTJOIN_OP | TExpression getLeftOperand(), TExpression getRightOperand() |
rowConstructor | TExpressionList getExprList() |
rowConstructor | NULL |
SCOPE_RESOLUTION | N/A |
simple_comparison_conditions | TExpression getLeftOperand(), TExpression getRightOperand() |
simpleConstant | TConstant getConstantOperand() |
simpleObjectname | TObjectName getObjectOperand() |
simpleSourcetoken | TSourceToken getSourcetokenOperand() |
sqlserver_proprietary_column_alias | TExpression getLeftOperand(), TExpression getRightOperand() |
squareRoot | TExpression getRightOperand() |
subqueryExprOperator | TSelectSqlStatement getSubQuery() |
TIMES | TExpression getLeftOperand(), TExpression getRightOperand() |
true_false_unknown | TExpression getLeftOperand() |
typecast | TExpression getLeftOperand() |
typeconstructorExprOperator | N/A |
UnknownOperator | TExpression getLeftOperand(), TExpression getRightOperand() |
UnknownUnaryOperator | TExpression getRightOperand() |
UnknownUnaryOperatorRight | TExpression getLeftOperand() |
until_changed | TExpression getLeftOperand() |
year_to_month | TExpression getLeftOperand() |
Field Summary | |
---|---|
static int |
absoluteValue
Postgresql absolute value |
static int |
arrayaccess
|
static int |
arrayConstructor
An array constructor is an expression that builds an array value using values for its member elements. |
static int |
ASSIGNMENT
Used in set clause of update statement. |
static int |
at_local
ORACLE,teradata date time expression, at local. |
static int |
at_time_zone
ORACLE,teradata date time expression, at time zone. |
static int |
between_conditions
A BETWEEN condition determines whether the value of one expression is in an interval defined by two other expressions. |
static int |
BITWISE_AND
SQL SERVER, postgresql |
static int |
BITWISE_EXCLUSIVE_OR
SQL SERVER |
static int |
BITWISE_NOT
Postgresql bitwise not |
static int |
BITWISE_OR
SQL SERVER, postgresql |
static int |
BITWISE_SHIFT_LEFT
Postgresql bitwise shit left |
static int |
BITWISE_SHIFT_RIGHT
Postgresql bitwise shit right |
static int |
BITWISE_XOR
MySQL, postgresql |
static int |
caseExprOperator
CASE expressions let you use IF ... |
static int |
COLLATE
sql server, Is a clause that can be applied to a database definition or a column definition to define the collation, or to a character string expression to apply a collation cast. |
static int |
compoundAssignment
sql server 2008 +=,-=,*=,/=,%= |
static int |
compoundParenthesis
expression with parenthesis, expr can be get via getLeftOperand() which is type of TExpression . |
static int |
compoundPrior
Oracle prior expression, syntax: PRIOR expr value can be accessed via getRightOperand() which is type of TExpression |
static int |
compoundUnaryBitwiseNot
sql server |
static int |
compoundUnaryMinus
unary minus expression, |
static int |
compoundUnaryPlus
unary plus expression, |
static int |
CONCATENATE
Links two string operands to form a string expression. |
static int |
connect_by_root
oracle unary operator connect_by_root is only valid in hierarchical queries |
static int |
cubeRoot
Postgresql cube root |
static int |
cursorExprOperator
A CURSOR expression returns a nested cursor. |
static int |
datetimeExprOperator
datetime expression |
static int |
day_to_second
ORACLE date time expression, day to second. |
static int |
DIVIDE
syntax: expr / expr |
static int |
dummyOperator
|
static int |
exists_condition
An EXISTS condition tests for existence of rows in a subquery. |
static int |
EXPONENTIATE
teradata ** , Postgresql ^ |
static int |
expr_list
row descriptor, values can be get via getExprList() |
static int |
factorial
Postgresql factorial: |
static int |
factorialPrefix
Postgresql factorial (prefix operator): |
static int |
fieldSelection
If an expression yields a value of a composite type (row type), then a specific field of the row can be extracted by writing |
static int |
floating_point_conditions
The ORACLE floating-point conditions let you determine whether an expression is infinite or is the undefined result of an operation (is not a number or NaN). |
static int |
funcationCallOperator
funcation expression, |
static int |
group_comparison_conditions
Comparison conditions compare one expression with another. |
static int |
in_conditions
An in_condition is a membership condition. |
static int |
in_expr
IN expr, values can be get via getInExpr() |
static int |
interval_expression
Teradata interval expression: |
static int |
intervalExprOperator
interval expression |
static int |
is_distinct_from
Postgresql, |
static int |
is_document
Postgresql, is document condition |
static int |
isoftype_condition
expr can be accessed via getLeftOperand() |
static int |
left_shift
MySQL left shift |
static int |
LEFTJOIN_OP
sql server, LEFTJOIN_OP *= |
static int |
logical_conditions_and
A logical condition combines the results of two component conditions to produce a single result based on them or to invert the result of a single condition. |
static int |
logical_conditions_is
Mdx is logical condition |
static int |
logical_conditions_not
A logical condition combines the results of two component conditions to produce a single result based on them or to invert the result of a single condition. |
static int |
logical_conditions_or
A logical condition combines the results of two component conditions to produce a single result based on them or to invert the result of a single condition. |
static int |
logical_conditions_xor
A logical condition combines the results of two component conditions to produce a single result based on them or to invert the result of a single condition. |
static int |
member_of
ORACLE |
static int |
MINUS
syntax: expr - expr |
static int |
modelExprOperator
model expression, not implemented yet |
static int |
MODULO
SQL SERVER,TERADATE(mod) |
static int |
multisetExprOperator
Oracle MULTISET operator |
static int |
mysql_binary_operator
MySQL binary operator, select binary 'a' = 'A' |
static int |
new_structured_type
teradata Constructs a new instance of a structured type and initializes it using the specified constructor method or function. |
static int |
new_variant_type
Teradata Constructs a new instance of a dynamic or VARIANT_TYPE UDT and defines the run time composition of the UDT. |
static int |
null_conditions
A NULL condition tests for nulls. |
static int |
objectaccessExprOperator
object access expression, some of those was represented by simpleObjectname expression. |
static int |
pattern_matching_conditions
The pattern-matching conditions compare character data. |
static int |
patternMatchingExprOperator
pattern matching conditon support like only, regexp_like was treat as a function |
static int |
period_ldiff
Teradata period expression: ldiff |
static int |
period_p_intersect
Teradata period expression: p_intersect |
static int |
period_p_normalize
Teradata period expression: p_normalize |
static int |
period_rdiff
Teradata period expression: rdiff |
static int |
placeholderExprOperator
place holder expression |
static int |
PLUS
syntax: expr + expr |
static int |
POWER
mdx power operator ^ |
static int |
RANGE
Mdx range operator : |
static int |
ref_arrow
plsql RAISE_APPLICATION_ERROR (num=> -20107, msg=> 'Duplicate customer or order ID'); |
static int |
right_shift
MySQL rigth shift |
static int |
RIGHTJOIN_OP
sql server, RIGHTJOIN_OP =* |
static int |
rowConstructor
A row constructor is an expression that builds a row value (also called a composite value) using values for its member fields. |
static int |
SCOPE_RESOLUTION
SQL SERVER |
static int |
simple_comparison_conditions
Comparison conditions compare one expression with another. |
static int |
simpleConstant
specifies a constant, value can be get via getConstantOperand() |
static int |
simpleObjectname
specifies a column, pseudocolumn, sequence number, value can be get via getObjectOperand() which is type of TObjectName . |
static int |
simpleSourcetoken
specifies a null, value can be get via getSourcetokenOperand() which is type of TSourceToken . |
static int |
sqlserver_proprietary_column_alias
SQL SERVER Proprietary syntax, set alias of a column in select list, column expr in rightOperand. |
static int |
squareRoot
Postgresql square root |
static int |
subqueryExprOperator
A scalar subquery expression is a subquery that returns exactly one column value from one row. |
static int |
TIMES
syntax: expr * expr |
static int |
true_false_unknown
Postgresql |
static int |
typecast
plsql |
static int |
typeconstructorExprOperator
type constructor expression, |
static int |
unknown
unknow expression type |
static int |
UnknownOperator
This UnknownOperator means this expression was not recognized by SQL parser yet. |
static int |
UnknownUnaryOperator
This UnknownLeftUnaryOperator means this expression was not recognized by SQL parser yet. |
static int |
UnknownUnaryOperatorRight
This UnknownLeftUnaryOperator means this expression was not recognized by SQL parser yet. |
static int |
until_changed
Teradata until changed condition |
static int |
year_to_month
ORACLE date time expression, year to month. |
Constructor Summary | |
---|---|
TExpression()
|
Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode |
---|
addAllMyTokensToTokenList, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, init, init, setDummyTag, setEndToken, setEndToken, setGsqlparser, setNodeType, setStartToken, setStartToken, setString, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int unknown
public static final int PLUS
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int MINUS
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int TIMES
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int DIVIDE
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int CONCATENATE
syntax: expr || expr,
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int MODULO
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int ASSIGNMENT
Or, assign argument in postgresql function argument like this:
param_name ASSIGN_SIGN basic_expr
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_AND
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_OR
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_XOR
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_EXCLUSIVE_OR
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int SCOPE_RESOLUTION
The scope resolution operator :: provides access to static members of a compound data type, SELECT @hid = hierarchyid::GetRoot();
Not implemented yet,
public static final int EXPONENTIATE
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int compoundAssignment
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int simpleObjectname
getObjectOperand()
which is type of TObjectName
.
public static final int simpleConstant
getConstantOperand()
public static final int simpleSourcetoken
getSourcetokenOperand()
which is type of TSourceToken
.
public static final int compoundParenthesis
getLeftOperand()
which is type of TExpression
.
public static final int compoundUnaryPlus
syntax: + expression
expr can be accessed via getRightOperand()
public static final int compoundUnaryMinus
syntax: - expression
expr can be accessed via getRightOperand()
public static final int compoundPrior
getRightOperand()
which is type of TExpression
public static final int caseExprOperator
getCaseExpression()
which is type of TCaseExpression
.
public static final int cursorExprOperator
syntax: CURSOR(subquery ),
subquery can be accessed via getSubQuery()
which is type of TSelectSqlStatement
.
public static final int funcationCallOperator
value can be get via getFunctionCall()
public static final int datetimeExprOperator
N/A
public static final int intervalExprOperator
N/A
public static final int modelExprOperator
N/A
public static final int subqueryExprOperator
getSubQuery()
which is type of TSelectSqlStatement
.
public static final int typeconstructorExprOperator
not implemented yet
public static final int objectaccessExprOperator
N/A
public static final int patternMatchingExprOperator
N/A
public static final int placeholderExprOperator
public static final int in_expr
getInExpr()
public static final int expr_list
getExprList()
public static final int dummyOperator
public static final int simple_comparison_conditions
Syntax: expr EQUAL|NOT_EQUAL|LESS_THAN|GRREAT_THAN|LESS_EQUAL_THAN|GREATE_EQUAL_THAN expr, or, (expr_list) EQUAL|NOT_EQUAL (subquery)
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int group_comparison_conditions
A group comparison condition specifies a comparison with any or all members in a list or subquery.
Syntax: expr EQUAL|NOT_EQUAL|LESS_THAN|GRREAT_THAN|LESS_EQUAL_THAN|GREATE_EQUAL_THAN ANY|SOME|ALL (expr_list|subquery), or, (expr_list) EQUAL|NOT_EQUAL ANY|SOME|ALL (expr_list|subquery)
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int in_conditions
Syntax: (expr|expr_list) IN|NOT IN (expr_list|subquery).
expr can be accessed via getLeftOperand()
and getRightOperand()
Use getOperatorToken()
to distinguish in or not in.
public static final int floating_point_conditions
Syntax: expr IS|IS NOT (NAM|INFINITE).
Value can be get via getLeftOperand()
public static final int pattern_matching_conditions
The LIKE conditions specify a test involving pattern matching.
Syntax: expr1 LIKE|NOT_LIKE expr1 [ESCAPE expr3],
expr1 can be get via getLeftOperand()
,
expr2 can be get via getRightOperand()
,
expr3 can be get via getLikeEscapeOperand()
,
Use getOperatorToken()
to distinguish is like or is not like
public static final int null_conditions
Syntax: expr IS [NOT] null
expr can be accessed via getLeftOperand()
Use getOperatorToken()
to distinguish is null or is not null
public static final int between_conditions
Syntax: expr1 [NOT] BETWEEN expr2 AND expr3
expr1 can be get via betweenOperand
,
expr2 can be get via getLeftOperand()
, and expr3 can be get via getRightOperand()
,
Use getOperatorToken()
to distinguish is between or is not between
public static final int exists_condition
Syntax: EXISTS (subquery).
value of subquery can be get via getSubQuery()
public static final int isoftype_condition
expr can be accessed via getLeftOperand()
public static final int logical_conditions_and
Syntax: expr AND expr.
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int logical_conditions_or
Syntax: expr OR expr.
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int logical_conditions_xor
Syntax: expr XOR expr.
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int logical_conditions_not
Syntax: NOT expr.
value can be get via rightOperand
,
public static final int logical_conditions_is
public static final int RANGE
public static final int POWER
public static final int at_time_zone
Syntax: expr1 AT TIME ZONE expr2
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int at_local
Syntax: expr AT LOCAL.
expr can be accessed via getLeftOperand()
public static final int day_to_second
Syntax: expr DAY [( integer )] TO SECOND [( integer )].
expr cam be get via getLeftOperand()
.
The type of this operand is TExpression
.
public static final int year_to_month
Syntax: expr YEAR [( integer )] TO MONTH.
expr can be accessed via getLeftOperand()
public static final int interval_expression
( date_time_expression date_time_term ) start TO end
public static final int new_structured_type
object reference getFunctionCall()
public static final int new_variant_type
getNewVariantTypeArgumentList()
public static final int period_ldiff
expression can be accessed via getLeftOperand()
and getRightOperand()
public static final int period_rdiff
expression can be accessed via getLeftOperand()
and getRightOperand()
public static final int period_p_intersect
expression can be accessed via getLeftOperand()
and getRightOperand()
public static final int period_p_normalize
expression can be accessed via getLeftOperand()
and getRightOperand()
public static final int until_changed
syntax: END(period_value_expression) IS[NOT] UNTIL_CHANGED
ending bound of a Period value expression can be accessed via getLeftOperand()
public static final int is_document
expr is [not] document
expr was set in leftOperand
.
getOperatorToken()
can be used to check whether NOT keyword was used or not.
public static final int is_distinct_from
expr is [not] distinct from expr
expr can be accessed via getLeftOperand()
and getRightOperand()
getOperatorToken()
can be used to check whether NOT keyword was used or not.
public static final int true_false_unknown
true, false, unknown condition
expr is [not] true
expr is [not] false
expr is [not] unknown
expr can be accessed via getLeftOperand()
getOperatorToken()
can be used to check whether NOT keyword was used or not.
public static final int compoundUnaryBitwiseNot
expr can be accessed via getRightOperand()
public static final int COLLATE
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int LEFTJOIN_OP
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int RIGHTJOIN_OP
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int ref_arrow
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int typecast
expr can be accessed via getLeftOperand()
public static final int arrayaccess
public static final int connect_by_root
expr can be accessed via getRightOperand()
public static final int sqlserver_proprietary_column_alias
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int mysql_binary_operator
syntax: binary expr
expr can be accessed via getRightOperand()
public static final int left_shift
Syntax: expr << expr.
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int right_shift
Syntax: expr >> expr.
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int multisetExprOperator
Syntax MULTISET (subquery)
subquery can be get via getSubQuery()
public static final int fieldSelection
expression.fieldname
In general the row expression must be parenthesized, but the parentheses can be omitted
when the expression to be selected from is just a table reference or positional parameter.
For example:
mytable.mycolumn
$1.somecolumn
(rowfunction(a,b)).col3
(Thus, a qualified column reference is actually just a special case of the field selection syntax.) An important special case is extracting a field from a table column that is of a composite type:
(compositecol).somefield
(mytable.compositecol).somefield
The parentheses are required here to show that compositecol is a column name not a table name,
or that mytable is a table name not a schema name in the second case.
n a select list, you can ask for all fields of a composite value by writing .*:
(compositecol).*
When expression in following syntax, it will be marked as fieldSelection
, and check getFieldName()
(rowfunction(a,b)).col3
(compositecol).somefield
(mytable.compositecol).somefield
(compositecol).*
Otherwise, it will be marked as simpleObjectname
:
mytable.mycolumn
$1.somecolumn
public static final int arrayConstructor
like this: ARRAY[1,2,3+4]
array element values can be accessed via getExprList()
,
or getExprList()
can be null when it is: array[]
It is also possible to construct an array from the results of a subquery like this:
SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
thus, subquery can be access via getSubQuery()
public static final int rowConstructor
like this: ROW(1,2.5,'this is a test')
element values can be accessed via getExprList()
,
or getExprList()
can be null when it is: row()
public static final int factorial
expr !
expr can be accessed via getLeftOperand()
public static final int squareRoot
|/ 25.0
expr can be accessed via getRightOperand()
public static final int cubeRoot
||/ 27.0
expr can be accessed via getRightOperand()
public static final int factorialPrefix
!! 5
expr can be accessed via getRightOperand()
public static final int absoluteValue
@ -5.0
expr can be accessed via getRightOperand()
public static final int BITWISE_SHIFT_LEFT
expr << expr
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_SHIFT_RIGHT
expr >> expr
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int BITWISE_NOT
~expr
expr can be accessed via getRightOperand()
public static final int member_of
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int UnknownOperator
In syntax like this:
expr OPERATOR expr
expr can be accessed via getLeftOperand()
and getRightOperand()
public static final int UnknownUnaryOperator
In syntax like this:
OPERATOR expr
expr can be accessed via getRightOperand()
public static final int UnknownUnaryOperatorRight
In syntax like this:
expr OPERATOR
expr can be accessed via getLeftOperand()
Constructor Detail |
---|
public TExpression()
Method Detail |
---|
public void setOperatorToken(TSourceToken operatorToken)
public TSourceToken getOperatorToken()
public void setVal(java.lang.Object val)
public java.lang.Object getVal()
public TConstant getConstantOperand()
public void setNewVariantTypeArgumentList(TNewVariantTypeArgumentList newVariantTypeArgumentList)
public TNewVariantTypeArgumentList getNewVariantTypeArgumentList()
public void setTypeName(TTypeName typeName)
public TTypeName getTypeName()
public TObjectName getFieldName()
getExpressionType()
is fieldSelection
public void setIndirection(TIndirection indirection)
public boolean isSubscripts()
expression[subscript]
or multiple adjacent elements (an "array slice") can be extracted by writing
expression[lower_subscript:upper_subscript]
In general the array expression must be parenthesized, but the parentheses can be omitted when the expression to be subscripted is just a column reference or positional parameter.
Also, multiple subscripts can be concatenated when the original array is multidimensional. For example:
when sytnax like this:
mytable.arraycolumn[4]
mytable.two_d_column[17][34]
$1[10:42]
check getObjectOperand()
for more detailed information about subscript.
when syntax like this:
(arrayfunction(a,b))[42]
check getIndirection()
when isSubscripts()
is true.
public TIndirection getIndirection()
public boolean isNotModifier()
public void setOutputFormatPhraseList(TOutputFormatPhraseList outputFormatPhraseList)
public TOutputFormatPhraseList getOutputFormatPhraseList()
column_expr (named alias_name)
public TExpressionList getExprList()
public void setIntervalExpr(TIntervalExpression intervalExpr)
public TIntervalExpression getIntervalExpr()
public void setInExpr(TInExpr inExpr)
public void setExprList(TExpressionList exprList)
public void setOracleOuterJoin(boolean oracleOuterJoin)
public boolean isOracleOuterJoin()
public TExpression getParentExpr()
public void setParentExpr(TExpression parentExpr)
public void setLeftOperand(TExpression leftOperand)
public void setRightOperand(TExpression rightOperand)
public void setExpressionType(int expressionType)
public TExpression getRightOperand()
public TExpression getLeftOperand()
public TExpression getLikeEscapeOperand()
public TExpression getBetweenOperand()
public TArrayAccess getArrayAccess()
public int getExpressionType()
public void setObjectOperand(TObjectName objectOperand)
public TObjectName getObjectOperand()
public void setConstantOperand(TConstant constantOperand)
public TSourceToken getSourcetokenOperand()
public void setSourcetokenOperand(TSourceToken sourcetokenOperand)
public void setCaseExpression(TCaseExpression caseExpression)
public TCaseExpression getCaseExpression()
public void setArrayAccess(TArrayAccess arrayAccess)
public void setSubQueryNode(TSelectSqlNode subQueryNode)
public void setSubQuery(TSelectSqlStatement subQuery)
public TSelectSqlStatement getSubQuery()
public void setSubQueryInStmt(boolean subQueryInStmt)
public TFunctionCall getFunctionCall()
public void setFunctionCall(TFunctionCall functionCall)
public void setDatetimeExpression(TDatetimeExpression datetimeExpression)
public void setIntervalExpression(TIntervalExpression intervalExpression)
public void setBetweenOperand(TExpression betweenOperand)
public void setLikeEscapeOperand(TExpression likeEscapeOperand)
public TInExpr getInExpr()
public void doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNode
doParse
in class TParseTreeNode
public TSourceToken getQuantifier()
public TSourceToken getComparisonOperator()
public void setComparisonOperator(TSourceToken comparisonOperator)
public void setQuantifier(TSourceToken quantifier)
public void accept(TParseTreeVisitor v)
accept
in interface Visitable
accept
in class TParseTreeNode
public boolean isLeaf()
public boolean isLeafExpr(TParseTreeNode pnode)
public void setVisitSubTree(boolean visitSubTree)
public boolean isVisitSubTree()
public void preOrderTraverse(IExpressionVisitor ev)
public void inOrderTraverse(IExpressionVisitor ev)
public void postOrderTraverse(IExpressionVisitor ev)
public void addANDCondition(java.lang.String condition)
condition
- public void addORCondition(java.lang.String condition)
condition
- public void remove()
f1 > 1 and f2 > 2, after remove f2>2, parent expression will be changed to: f1 > 1
If we need to remove condition f > 1 from where clause: wherr f > 1, Here f > 1 is the top level expression, after remove it from where clause, only WHERE keyword left in where clause.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |