You are here: Using General SQL Parser > Visitor pattern used in General SQL Parser
ContentsIndexHome
PreviousUpNext
Visitor pattern used in General SQL Parser
Visitor pattern used in General SQL Parser

 

All nodes(except TSourceToken) in parse tree are inherited from TLz_node. While TSourceToken and TLz_node are all inherited from TLzVisitedAbs which can be visited by visitors created from subclass of TLzVisitorAbs. 

So , if you like to iterate parse tree for your own purpose, you may create a visitor from TLzVisitorAbs, and use it to visit parse tree. For more information on how to create and use visitor, check the demo shipped together with this component. 

 

Here is demo: 

http://www.sqlparser.com/dl/samples/iteratesqlparsetree.zip 

Gudu software http://www.sqlparser.com
Send comments about this topic.