Package gudusoft.gsqlparser.stmt
Class TVarDeclStmt
Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.TCustomSqlStatement
gudusoft.gsqlparser.stmt.TVarDeclStmt
- All Implemented Interfaces:
IRelation,Visitable,Iterator<TSourceToken>
Represents declare statement that used to decalre variable, constant, exception and subtype.
Or Signifies that the statement is a pragma (compiler directive), including exception_init_pragma,
autonomous_transaction_pragma, restrict_references_pragma, serially_resuable_pragma and pragma_timestamp
-
Nested Class Summary
Nested classes/interfaces inherited from class gudusoft.gsqlparser.TCustomSqlStatement
TCustomSqlStatement.SqlNormalizationProfile -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.exceptionstatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_autonomous_transactionstatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_exception_initstatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_interfacestatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_restrict_referencesstatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_serially_reusablestatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_timestampstatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.subtypestatic final intDeprecated.As of v1.4.8.8, replaced byEDeclareType.variableFields inherited from class gudusoft.gsqlparser.TCustomSqlStatement
dummytag, fromClause, fromSourceJoin, fromSourceTable, isctequery, isparsed, joins, parser, plsqlparser, relationAttributes, rootNode, semicolonended, sourcetokenlist, sqlstatementtype, stmtScope, tablesFields 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 classintDatatype of declared element.Default value of a variable or constant that declared.Name of element that declared.Any valid Oracle Database error number.Name of a user-defined exception declared within the current scope.intHow deafult value of a variable or constant was set.booleanSpecifies that no element can have the value NULL.getValue()Deprecated.As of v1.4.8.8, replaced bygetDefaultValue()intIndicates what's kind of element this delcare statement declared such as variable, constant, exception, subtype and various pragma clause.voidInitialize a query tree node.voidvoidvoidsetAliasItem(TObjectName aliasItem) voidsetCollateName(TObjectName collateName) voidsetDataType(TTypeName dataType) voidsetDeclareType(EDeclareType declareType) voidsetDefaultValue(TExpression defaultValue) voidsetElementName(TObjectName elementName) voidsetError_number(TExpression error_number) voidsetException_name(TObjectName exception_name) voidsetHowtoSetValue(int howtoSetValue) voidsetNotNull(boolean notNull) voidsetValue(TExpression value) voidsetWhatDeclared(int whatDeclared) Methods inherited from class gudusoft.gsqlparser.TCustomSqlStatement
addToTables, addWhereClause, analyzeFromTable, analyzeFromTable, analyzeJoin, analyzeTablename, analyzeTableOrJoin, asCanonical, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, clearError, computeSqlHash, dochecksyntax, findTable, fireOnMetaDatabaseTableColumn, getAncestorStmt, getAttributes, getColumnsInTable, getColumnsInTable, getCteIncludeThisStmt, getCteList, getDaxFunctionStack, getEndlabelName, getErrorCount, getErrormessage, getExpandedResultColumns, getFirstPhysicalTable, getFrameStack, getFromClause, getFromSourceJoin, getFromSourceTable, getGlobalScope, getIndexColumns, getJoins, getLabelName, getOrphanColumns, getOutputClause, getParentObjectName, getParentStmt, getQueryId, getRelationName, getRelations, getResultColumnList, getReturningClause, getSqlEnv, getSqlHash, getSqlHash, getStatements, getStmtScope, getSymbolTable, getSyntaxErrors, getSyntaxHints, getTables, getTargetTable, getTokenList, getTopClause, getTopStatement, getUsingVariableList, getVariableStack, getWhereClause, isathenaplsql, isBigQueryplsql, isdatabricksplsql, isGaussDBStoredProcedure, isgreeplumplsql, isnzplsql, isoracleplsql, ispgplsql, isprestoplsql, issnowflakeplsql, isTableACTE, isverticaplsql, linkColumnReferenceToTable, linkColumnToTable, linkToFirstTable, locateVariableOrParameter, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parseerrormessagehandle, parsestatement, parsestatement, searchCTEList, searchDaxVariableInStack, searchFunctionInSQLEnv, setAlreadyAddToParent, setCteIncludeThisStmt, setCteList, setEndlabelName, setFrameStack, setFromClause, setLabelName, setOutputClause, setParentStmt, setParentStmtToNull, setQueryId, setResultColumnList, setReturningClause, setSqlHash, setStmtScope, setTargetTable, setTopClause, setUsingVariableList, setVariableStack, setWhereClause, size, toNormalizedSql, toScript, VerticaStatementCanBeSeparatedByBeginEndPairMethods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getPlainText, getStartToken, getTokenCount, hasNext, 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, 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
-
whatDeclared_variable
Deprecated.As of v1.4.8.8, replaced byEDeclareType.variable- See Also:
-
whatDeclared_constant
Deprecated.As of v1.4.8.8, replaced byEDeclareType.constant- See Also:
-
whatDeclared_exception
Deprecated.As of v1.4.8.8, replaced byEDeclareType.exception- See Also:
-
whatDeclared_subtype
Deprecated.As of v1.4.8.8, replaced byEDeclareType.subtype- See Also:
-
whatDeclared_pragma_exception_init
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_exception_init- See Also:
-
whatDeclared_pragma_autonomous_transaction
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_autonomous_transaction- See Also:
-
whatDeclared_pragma_serially_reusable
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_serially_reusable- See Also:
-
whatDeclared_pragma_timestamp
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_timestamp- See Also:
-
whatDeclared_pragma_restrict_references
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_restrict_references- See Also:
-
whatDeclared_pragma_interface
Deprecated.As of v1.4.8.8, replaced byEDeclareType.pragma_interface- See Also:
-
-
Constructor Details
-
TVarDeclStmt
public TVarDeclStmt() -
TVarDeclStmt
-
-
Method Details
-
setWhatDeclared
-
getWhatDeclared
Indicates what's kind of element this delcare statement declared such as variable, constant, exception, subtype and various pragma clause.- Returns:
-
getHowtoSetValue
How deafult value of a variable or constant was set.:= | DEFAULT
:=
TBaseType.howtoSetValue_assignor DEFAULT keyword
TBaseType.howtoSetValue_default;- Returns:
-
getValue
Deprecated.As of v1.4.8.8, replaced bygetDefaultValue() -
getNotNull
Specifies that no element can have the value NULL.- Returns:
-
setDefaultValue
-
getDefaultValue
Default value of a variable or constant that declared. -
setCollateName
-
getCollateName
-
setDeclareType
-
getDeclareType
-
setError_number
-
setException_name
-
getError_number
Any valid Oracle Database error number. Used when this class represents exception_init_pragma.- Returns:
-
getException_name
Name of a user-defined exception declared within the current scope. Used when this class represents exception_init_pragma.- Returns:
-
setAliasItem
-
getAliasItem
-
init
Description copied from class:TParseTreeNodeInitialize a query tree node. Used internally- Overrides:
initin classTParseTreeNode- Parameters:
arg1- first argument
-
init
- Overrides:
initin classTParseTreeNode
-
init
- Overrides:
initin classTParseTreeNode
-
getDataType
Datatype of declared element.- Returns:
-
doParseStatement
- Overrides:
doParseStatementin classTCustomSqlStatement
-
getElementName
Name of element that declared.- Returns:
-
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
-
setElementName
-
setDataType
-
setNotNull
-
setValue
-
setHowtoSetValue
-
EDeclareType.constant