public class TBlockSqlNode extends TNodeWithLabel
TCreateFunctionStmt
and TCreateProcedureStmt
to retrieve the declarations and statements as shown below.
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 ];
TCreateProcedureStmt
,
TCreateFunctionStmt
Modifier and Type | Field and Description |
---|---|
protected TStatementList |
bodyStatements |
protected TStatementList |
declareStatements |
protected TExceptionClause |
exceptionClause |
protected TObjectName |
outerLabelName |
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken
Constructor and Description |
---|
TBlockSqlNode() |
Modifier and Type | Method and Description |
---|---|
void |
accept(TParseTreeVisitor v)
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Accept a visitor to iterate this class and sub-nodes of this class
|
void |
doParse(TCustomSqlStatement psql,
ESqlClause plocation)
Analyze the sub-nodes inside this node.
|
TStatementList |
getBodyStatements() |
TStatementList |
getDeclareStatements() |
TStatementListSqlNode |
getDeclareStmts() |
TExceptionClause |
getExceptionClause() |
TObjectName |
getOuterLabelName() |
TStatementListSqlNode |
getStmts() |
void |
init(Object arg1)
Initialize a query tree node.
|
boolean |
isParsed() |
void |
setBodyStatements(TStatementList bodyStatements) |
void |
setDeclareStatements(TStatementList declareStatements) |
void |
setDeclareStmts(TStatementListSqlNode declareStmts) |
void |
setExceptionClause(TExceptionClause exceptionClause) |
void |
setOuterLabelName(TObjectName outerLabelName) |
void |
setParsed(boolean parsed) |
void |
setStmts(TStatementListSqlNode stmts) |
getEndlabelName, getLabelName, getLabelNameStr, setEndlabelName, setLabelName
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, toString2
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
protected TObjectName outerLabelName
protected TStatementList declareStatements
protected TStatementList bodyStatements
protected TExceptionClause exceptionClause
public TBlockSqlNode()
public void setParsed(boolean parsed)
public boolean isParsed()
public void init(Object arg1)
TParseTreeNode
init
in class TParseTreeNode
arg1
- first argumentpublic TExceptionClause getExceptionClause()
public void setExceptionClause(TExceptionClause exceptionClause)
public TStatementListSqlNode getDeclareStmts()
public TStatementListSqlNode getStmts()
public void setStmts(TStatementListSqlNode stmts)
public void setDeclareStmts(TStatementListSqlNode declareStmts)
public void setOuterLabelName(TObjectName outerLabelName)
public TObjectName getOuterLabelName()
public void setDeclareStatements(TStatementList declareStatements)
public TStatementList getDeclareStatements()
public void setBodyStatements(TStatementList bodyStatements)
public TStatementList getBodyStatements()
public void doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNode
doParse
in class TParseTreeNode
psql
- SQL statement this node belongs toplocation
- SQL clause this node belongs topublic void accept(TParseTreeVisitor v)
TParseTreeNode
accept
in interface Visitable
accept
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void acceptChildren(TParseTreeVisitor v)
TParseTreeNode
acceptChildren
in interface Visitable
acceptChildren
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor