You are here: Symbol Reference > Classes > TLzCustomExpression Class
ContentsIndexHome
PreviousUpNext
TLzCustomExpression Class
File

lzexpression

Pascal
TLzCustomExpression = class(TLz_node);
Description

 

Expression is widely used in the sql, such as in the where clause,having clause. It's represented by the class TLzCustomExpression, and organized in a binary tree mode. 

 

Usually, expression is created after parsing a sql. 

You can also create expression manually in two ways: 

1. Create an empty TLzCustomExpression instance, and 

than add lexpr, rexpr and set oper yourself. 

 

2. Create a TLzCustomExpression instance with an expression string as paramter, than a binary expression 

tree will be created automatically with lexpr, rexpr

oper and other properties set correctly if input expression string is a valid expression. 

 

You can construct very complex expression by setting lexpr and rexpr to new created TLzCustomExpression instance recursively with proper oper value. 

 

You can create your own function to visit expression in 

pre-order(PreOrderTraverse)/in-order(InOrderTraverse)/post-order(PostOrderTraverse). 

 

Here is a list of all expressions type specified by oper:TLzOpType. 

  • Expr_Arithmetic + - / %
  • String Concatenation Operator + ||
  • Expr_Comparison = > < >= <= <> != !< !>
  • Expr_Between Expr_NotBetween
  • Expr_In Expr_NotIn
  • Expr_Like Expr_NotLike
  • Expr_Exists
  • Expr_IsNull, Expr_IsNotNull
  • Logical operators
  • AND OR NOT
  • Expr_Unary + - ~
  • Expr_Assign =
  • Bitwise Operators & | ^
  • Expr_Parenthesis ( )
  • Expr_Comma ,
  • Expr_subquery
  • Expr_FuncCall
  • Expr_Attr
  • Expr_Const
  • More expression types

See Also
Hierarchy
Related Information
Gudu software http://www.sqlparser.com
Send comments about this topic.