Package gudusoft.gsqlparser.nodes
Class TBlockSqlNode
Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TNodeWithLabel
gudusoft.gsqlparser.nodes.TBlockSqlNode
- All Implemented Interfaces:
Visitable,Iterator<TSourceToken>
TBlockSqlNode represents a block in a stored procedure.
It's used in
The mainly used methods are
TCreateFunctionStmt and TCreateProcedureStmt
to retrieve the declarations and statements as shown below.
The mainly used methods are
getDeclareStmts() to retrieve the declarations, getBodyStatements() to
retrieve the statements.
getExceptionClause() represents the exception section in the block if any.
[ <<label>> ]
[ DECLARE
declarations ]
BEGIN
statements
END [ label ];
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TStatementListprotected TStatementListprotected TExceptionClauseprotected TObjectNameFields inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept a visitorvoidAccept a visitor to iterate this class and sub-nodes of this classvoiddoParse(TCustomSqlStatement psql, ESqlClause plocation) Analyze the sub-nodes inside this node.getStmts()voidInitialize a query tree node.booleanisParsed()voidsetBodyStatements(TStatementList bodyStatements) voidsetDeclareStatements(TStatementList declareStatements) voidsetDeclareStmts(TStatementListSqlNode declareStmts) voidsetExceptionClause(TExceptionClause exceptionClause) voidsetOuterLabelName(TObjectName outerLabelName) voidsetParsed(boolean parsed) voidsetStmts(TStatementListSqlNode stmts) Methods inherited from class gudusoft.gsqlparser.nodes.TNodeWithLabel
getEndlabelName, getLabelName, getLabelNameStr, setEndlabelName, setLabelNameMethods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setPlainText, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toScript, toString, toString2Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
outerLabelName
-
declareStatements
-
bodyStatements
-
exceptionClause
-
-
Constructor Details
-
TBlockSqlNode
public TBlockSqlNode()
-
-
Method Details
-
setParsed
-
isParsed
-
init
Description copied from class:TParseTreeNodeInitialize a query tree node. Used internally- Overrides:
initin classTParseTreeNode- Parameters:
arg1- first argument
-
getExceptionClause
-
setExceptionClause
-
getDeclareStmts
-
getStmts
-
setStmts
-
setDeclareStmts
-
setOuterLabelName
-
getOuterLabelName
-
setDeclareStatements
-
getDeclareStatements
-
setBodyStatements
-
getBodyStatements
-
doParse
Description copied from class:TParseTreeNodeAnalyze the sub-nodes inside this node. Such as build the relationship between table and column.- Overrides:
doParsein classTParseTreeNode- Parameters:
psql- SQL statement this node belongs toplocation- SQL clause this node belongs to
-
accept
Description copied from class:TParseTreeNodeAccept a visitor- Specified by:
acceptin interfaceVisitable- Overrides:
acceptin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-
acceptChildren
Description copied from class:TParseTreeNodeAccept a visitor to iterate this class and sub-nodes of this class- Specified by:
acceptChildrenin interfaceVisitable- Overrides:
acceptChildrenin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-