Class SQLCommandVisitor
- All Implemented Interfaces:
FrostlakeVisitor<Object>,org.antlr.v4.runtime.tree.ParseTreeVisitor<Object>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteScriptingFunctionBody(Function function, List<Object> args) Execute aLANGUAGE SQLscalar UDF whose body is a Snowflake-Scripting block and yield the value its RETURN produced — live-verified:CREATE FUNCTION f() RETURNS INT AS $$ BEGIN RETURN 1; END $$thenSELECT f()is 1, and the block really runs (a body ofBEGIN RETURN 1; RETURN 2; ENDyields 1,BEGIN LET x INT := 5; RETURN x * 2; ENDyields 10, and a body with no RETURN at all yields NULL).extractStringLiteral(org.antlr.v4.runtime.tree.TerminalNode node) The shared column/constraint parser, for the handlers that build constraints outside CREATE.getOriginalText(org.antlr.v4.runtime.ParserRuleContext ctx) A loop LABEL is its own name position: it admits INNER, which a plain identifier may not (live acceptsCREATE TABLE inneryet refuses a bareFROM inner).parseDataType(FrostlakeParser.DataTypeNameContext ctx, FrostlakeParser.TypeParametersContext typeParams) String[]The ordered identifier parts of a qualified name (db, schema, name), read from the parse tree's identifier list — the AST-definitive way — rather than by splitting its flattened text on '.'.voidsetStreamManager(StreamManager streamManager) voidsetTaskScheduler(TaskScheduler taskScheduler) Visit a parse tree produced byFrostlakeParser.alterStatement().Visit a parse tree produced byFrostlakeParser.assignmentStatement().Visit a parse tree produced byFrostlakeParser.beginEndBlock().Visit a parse tree produced byFrostlakeParser.breakStatement().Visit a parse tree produced byFrostlakeParser.callStatement().Visit a parse tree produced byFrostlakeParser.caseStatement().Visit a parse tree produced byFrostlakeParser.closeStatement().Visit a parse tree produced byFrostlakeParser.commentStatement().Visit a parse tree produced byFrostlakeParser.continueStatement().Visit a parse tree produced byFrostlakeParser.copyIntoStatement().Visit a parse tree produced byFrostlakeParser.createStatement().Visit a parse tree produced byFrostlakeParser.cursorDeclaration().Visit a parse tree produced byFrostlakeParser.ddlStatement().Visit a parse tree produced byFrostlakeParser.declarationItem().Visit a parse tree produced byFrostlakeParser.deleteStatement().Visit a parse tree produced byFrostlakeParser.describeStatement().Visit a parse tree produced byFrostlakeParser.dmlStatement().Visit a parse tree produced byFrostlakeParser.dropStatement().Visit a parse tree produced byFrostlakeParser.executeImmediateStatement().Visit a parse tree produced byFrostlakeParser.explainStatement().Visit a parse tree produced byFrostlakeParser.fetchStatement().Visit a parse tree produced byFrostlakeParser.forStatement().Visit a parse tree produced byFrostlakeParser.getStatement().Visit a parse tree produced byFrostlakeParser.grantStatement().Visit a parse tree produced byFrostlakeParser.ifStatement().Visit a parse tree produced byFrostlakeParser.insertStatement().Visit a parse tree produced byFrostlakeParser.letStatement().Visit a parse tree produced byFrostlakeParser.listStatement().Visit a parse tree produced byFrostlakeParser.loopStatement().Visit a parse tree produced byFrostlakeParser.mergeStatement().Visit a parse tree produced byFrostlakeParser.multiTableInsertStatement().Visit a parse tree produced byFrostlakeParser.nullStatement().Visit a parse tree produced byFrostlakeParser.openStatement().Visit a parse tree produced byFrostlakeParser.proceduralStatement().Visit a parse tree produced byFrostlakeParser.putStatement().Visit a parse tree produced byFrostlakeParser.queryStatement().Visit a parse tree produced byFrostlakeParser.raiseStatement().Visit a parse tree produced byFrostlakeParser.removeStatement().Visit a parse tree produced byFrostlakeParser.repeatStatement().Visit a parse tree produced byFrostlakeParser.returnStatement().Visit a parse tree produced byFrostlakeParser.revokeStatement().Visit a parse tree produced byFrostlakeParser.securityStatement().Visit a parse tree produced byFrostlakeParser.selectIntoStatement().Visit a parse tree produced byFrostlakeParser.selectStatement().Visit a parse tree produced byFrostlakeParser.sessionSetStatement().Visit a parse tree produced byFrostlakeParser.sessionUnsetStatement().Visit a parse tree produced byFrostlakeParser.setStatement().Visit a parse tree produced byFrostlakeParser.showStatement().Visit a parse tree produced byFrostlakeParser.statement().Visit a parse tree produced byFrostlakeParser.taskStatement().Visit a parse tree produced byFrostlakeParser.transactionStatement().Visit a parse tree produced byFrostlakeParser.truncateStatement().Visit a parse tree produced byFrostlakeParser.undropStatement().Visit a parse tree produced byFrostlakeParser.untypedDeclarationItem().Visit a parse tree produced byFrostlakeParser.updateStatement().Visit a parse tree produced byFrostlakeParser.useStatement().Visit a parse tree produced byFrostlakeParser.variableDeclaration().Visit a parse tree produced byFrostlakeParser.whileStatement().Methods inherited from class dev.frostlake.parser.FrostlakeBaseVisitor
visitAdditiveExpr, visitAfterClause, visitAggregateFunction, visitAggregationPolicyClause, visitAliasName, visitAlterAddColumnItem, visitAlterColumnItem, visitAlterColumnItemAction, visitAndExpr, visitAnsiSubstringExpr, visitArrayAccessExpr, visitArrayElement, visitAsofMatchCondition, visitAssignment, visitAssignmentList, visitAsyncStatement, visitAwaitStatement, visitBetweenExpr, visitBindVarExpr, visitBodyDefinition, visitBooleanExprList, visitBooleanValue, visitBulkObjectType, visitBulkScope, visitCallArgument, visitCallArguments, visitCaseExpr, visitCastExpr, visitCastExpr2, visitChangesClause, visitCheckConstraint, visitCheckEnforcement, visitClusterByClause, visitCollateClause, visitCollateExpr, visitCollateFuncExpr, visitColumnCommentClause, visitColumnConstraint, visitColumnDef, visitColumnDefName, visitColumnList, visitColumnListOptional, visitColumnOrConstraint, visitColumnTagAction, visitCommentClause, visitComparisonExpr, visitComputePoolAction, visitComputePoolOption, visitComputePoolSetOption, visitComputePoolUnsetKey, visitComputePoolWorkloadType, visitConcatExpr, visitConnectByClause, visitConnectByPredicate, visitConnectByRootExpr, visitConstraintName, visitConstraintProperty, visitContactAssignment, visitContactProperty, visitContactPurpose, visitCopyFormatOption, visitCopyFormatOptions, visitCopyGrants, visitCopyIntoStageClause, visitCopyIntoTableClause, visitCopyOptionValue, visitCopyRestOfStatement, visitCopySource, visitCopyStatement, visitCopyTableSource, visitCopyTransformation, visitCopyTransformItem, visitCortexSearchAction, visitCortexSearchOption, visitCteDefinition, visitCurrentDateExpr, visitCurrentTimeExpr, visitCurrentTimestampExpr, visitCurrentUserExpr, visitCursorSource, visitDatabaseAction, visitDataTypeList, visitDataTypeName, visitDateTimeLiteralType, visitDeclareSection, visitDefaultExpression, visitDropBehavior, visitDynamicTableAction, visitDynamicTableOption, visitDynamicTableOptions, visitDynamicTableProperty, visitDynamicTableSetting, visitEscapeOperand, visitExceptionCondition, visitExceptionHandler, visitExceptionSection, visitExecuteAsClause, visitExistsExpr, visitExpressionList, visitExprItem, visitExprTuple, visitExtractFromExpr, visitFetchClause, visitFieldAccessExpr, visitFileFormatAction, visitFlattenArgList, visitFlowChain, visitFrameBound, visitFunctionArg, visitFunctionArgList, visitFunctionCallExpr, visitFunctionCallMixedArgsExpr, visitFunctionCallNamedArgsExpr, visitFunctionCallStarExpr, visitFunctionName, visitFunctionOption, visitGlobalPrivilege, visitGlobalPrivilegeList, visitGroupByClause, visitGroupByColumnList, visitGroupByElement, visitGroupingSet, visitGroupingSetList, visitHandlerClause, visitHavingClause, visitIdentifier, visitIdentifierList, visitIdentityProperties, visitIdentityWordOption, visitIf_exists, visitIf_not_exists, visitImportsClause, visitInListExpr, visitInSubqueryExpr, visitIntervalExpr, visitIntervalStringExpr, visitIntervalUnit, visitIntervalUnitSingular, visitIntoTarget, visitIntoTargetList, visitIsDistinctExpr, visitIsNullExpr, visitJoinClause, visitJoinPolicyClause, visitJoinType, visitJsonArrayExpr, visitJsonArrayLiteral, visitJsonKeyValuePair, visitJsonObjectEntry, visitJsonObjectExpr, visitJsonObjectLiteral, visitLambdaFunction, visitLambdaParam, visitLambdaParams, visitLanguageClause, visitLikeAnyAllExpr, visitLikeExpr, visitLimitClause, visitLiteral, visitLiteralExpr, visitLoopLabel, visitMaskingPolicyAction, visitMaterializedViewAction, visitMergeClause, visitMergeInsertColumn, visitMergeInsertColumnList, visitMergeSourceSubquery, visitMergeSourceTable, visitMergeSourceValues, visitMultiInsertElse, visitMultiInsertInto, visitMultiInsertWhen, visitMultiplicativeExpr, visitNamedArgument, visitNamedArgumentList, visitNamePart, visitNameStartPart, visitNonJoinKeywordIdentifier, visitNotExpr, visitNullHandling, visitNullHandlingClause, visitObjectAccessExpr, visitObjectName, visitObjectStarItem, visitObjectType, visitOptionKey, visitOr_replace, visitOrderByClause, visitOrderItem, visitOrExpr, visitOuterJoinColumnExpr, visitOverClause, visitPackagesClause, visitParameterDef, visitParameterList, visitParenExpr, visitParenOption, visitParenOptionList, visitPartitionByClause, visitPipeAction, visitPipeOption, visitPipeOptions, visitPipeRefreshOption, visitPipeSetOption, visitPivotAlias, visitPivotClause, visitPivotInList, visitPivotValue, visitPivotValueList, visitPositionalBindExpr, visitPositionInExpr, visitPriorExpr, visitPrivilege, visitPrivilegeList, visitProjectionPolicyAction, visitQualifiedName, visitQualifiedNameExpr, visitQualifiedStarItem, visitQualifyClause, visitQuantifiedComparisonExpr, visitQuantifier, visitReferentialAction, visitReferentialActions, visitReferentialOption, visitRelyOption, visitReturnType, visitRlikeExpr, visitRoleAction, visitRoutineAlterAction, visitRoutineSetProperty, visitRoutineUnsetProperty, visitRowAccessPolicyAction, visitRowAccessPolicyClause, visitRuntimeVersionClause, visitSampleClause, visitSampleMethod, visitSampleSeed, visitScalarSubqueryExpr, visitScheduleClause, visitSchemaAction, visitSearchedCaseExpr, visitSearchOptimizationDrop, visitSearchOptimizationTarget, visitSelectClause, visitSelectList, visitSelectOperand, visitSequenceAction, visitSequenceOption, visitSequenceOptions, visitSessionAction, visitSessionAssignment, visitSessionParameter, visitSessionVarExpr, visitSetOperator, visitShowPrivilege, visitShowTail, visitSignedInteger, visitSimpleCaseExpr, visitSpreadArgument, visitSqlScript, visitSqlStatement, visitStageAction, visitStageFileOption, visitStageOption, visitStagePath, visitStageProperties, visitStageQueryParam, visitStageQueryParams, visitStageRef, visitStarArgumentModifier, visitStarItem, visitStarModifier, visitStarQualifiedName, visitStarRenameItem, visitStarReplaceItem, visitStartWithClause, visitStatementList, visitStreamAction, visitStreamOption, visitStreamOptions, visitStringLiteralList, visitStructuredField, visitStructuredFieldList, visitStructuredFieldName, visitSystemFuncExpr, visitSystemStreamHasDataExpr, visitSystemUserTaskCancelExpr, visitTableAction, visitTableConstraint, visitTableExpression, visitTableFunctionExpr, visitTableQualifiedName, visitTableReference, visitTableSetProperty, visitTableSource, visitTableTailOption, visitTableUnsetProperties, visitTagAction, visitTagAssign, visitTagAssignment, visitTagList, visitTagProperties, visitTagSet, visitTagUnset, visitTaskAction, visitTaskBody, visitTaskOption, visitTaskOptions, visitTaskParamName, visitTimeTravelClause, visitTimeTravelPoint, visitTopClause, visitTransactionName, visitTryCastExpr, visitTupleInFlatListExpr, visitTupleInListExpr, visitTupleInSubqueryExpr, visitTupleRow, visitTypedDateTimeLiteralExpr, visitTypedLiteralArgExpr, visitTypeParameters, visitUnaryExpr, visitUnpivotClause, visitUnpivotColumnList, visitUnpivotNulls, visitUserAction, visitUserProperties, visitUserProperty, visitUserUnsetProperty, visitUsingColumnList, visitValueExpr, visitValueList, visitValueTuple, visitValueTupleList, visitVariantPathKey, visitViewAction, visitViewColumnDef, visitViewColumnList, visitViewProperty, visitVolatilityClause, visitWarehouseAction, visitWarehouseClause, visitWarehouseProperties, visitWarehouseProperty, visitWarehouseUnsetProperty, visitWhenClause, visitWhereClause, visitWindowFrame, visitWithClause, visitWithinGroupClauseMethods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
SQLCommandVisitor
-
-
Method Details
-
setStreamManager
-
setTaskScheduler
-
getTaskScheduler
-
getColumnParser
The shared column/constraint parser, for the handlers that build constraints outside CREATE. -
visitStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.statement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCreateStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.createStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCreateStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCreateStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDropStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.dropStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDropStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitDropStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAlterStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.alterStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAlterStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitAlterStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitUseStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.useStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitUseStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitUseStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitUndropStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.undropStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitUndropStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitUndropStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitExplainStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.explainStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitExplainStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitExplainStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCommentStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.commentStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCommentStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCommentStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTruncateStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.truncateStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTruncateStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitTruncateStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTransactionStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.transactionStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTransactionStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitTransactionStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSecurityStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.securityStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSecurityStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSecurityStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTaskStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.taskStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTaskStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitTaskStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitGrantStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.grantStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitGrantStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitGrantStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRevokeStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.revokeStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRevokeStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitRevokeStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitListStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.listStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitListStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitListStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPutStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.putStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitPutStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitPutStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitGetStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.getStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitGetStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitGetStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRemoveStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.removeStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRemoveStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitRemoveStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDdlStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.ddlStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDdlStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitDdlStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDmlStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.dmlStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDmlStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitDmlStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInsertStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.insertStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInsertStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitInsertStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitMultiTableInsertStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.multiTableInsertStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitMultiTableInsertStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitMultiTableInsertStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitUpdateStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.updateStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitUpdateStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitUpdateStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDeleteStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.deleteStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDeleteStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitDeleteStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitMergeStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.mergeStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitMergeStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitMergeStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCopyIntoStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.copyIntoStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCopyIntoStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCopyIntoStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQueryStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.queryStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitQueryStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitQueryStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSelectStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.selectStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSelectStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSelectStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitShowStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.showStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitShowStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitShowStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDescribeStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.describeStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDescribeStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitDescribeStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitProceduralStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.proceduralStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitProceduralStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitProceduralStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDeclarationItem
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.declarationItem().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDeclarationItemin interfaceFrostlakeVisitor<Object>- Overrides:
visitDeclarationItemin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitUntypedDeclarationItem
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.untypedDeclarationItem().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitUntypedDeclarationItemin interfaceFrostlakeVisitor<Object>- Overrides:
visitUntypedDeclarationItemin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitVariableDeclaration
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.variableDeclaration().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitVariableDeclarationin interfaceFrostlakeVisitor<Object>- Overrides:
visitVariableDeclarationin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCursorDeclaration
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.cursorDeclaration().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCursorDeclarationin interfaceFrostlakeVisitor<Object>- Overrides:
visitCursorDeclarationin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSetStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.setStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSetStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSetStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSessionSetStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.sessionSetStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSessionSetStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSessionSetStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSessionUnsetStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.sessionUnsetStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSessionUnsetStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSessionUnsetStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLetStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.letStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLetStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitLetStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAssignmentStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.assignmentStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAssignmentStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitAssignmentStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpenStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.openStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOpenStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitOpenStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFetchStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.fetchStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFetchStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitFetchStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCloseStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.closeStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCloseStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCloseStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSelectIntoStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.selectIntoStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSelectIntoStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitSelectIntoStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIfStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.ifStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIfStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitIfStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCaseStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.caseStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCaseStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCaseStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLoopStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.loopStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLoopStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitLoopStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitWhileStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.whileStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitWhileStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitWhileStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitForStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.forStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitForStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitForStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRepeatStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.repeatStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRepeatStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitRepeatStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitReturnStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.returnStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitReturnStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitReturnStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBreakStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.breakStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBreakStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitBreakStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitContinueStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.continueStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitContinueStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitContinueStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNullStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.nullStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNullStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitNullStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRaiseStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.raiseStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRaiseStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitRaiseStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCallStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.callStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCallStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitCallStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitExecuteImmediateStatement
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.executeImmediateStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitExecuteImmediateStatementin interfaceFrostlakeVisitor<Object>- Overrides:
visitExecuteImmediateStatementin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBeginEndBlock
Description copied from class:FrostlakeBaseVisitorVisit a parse tree produced byFrostlakeParser.beginEndBlock().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBeginEndBlockin interfaceFrostlakeVisitor<Object>- Overrides:
visitBeginEndBlockin classFrostlakeBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
getText
-
getText
A loop LABEL is its own name position: it admits INNER, which a plain identifier may not (live acceptsCREATE TABLE inneryet refuses a bareFROM inner). The keyword form has no quoting to strip, so it folds the same way an unquoted identifier does.- Parameters:
ctx- the loop-label parse tree — a plain identifier or the bare keyword form- Returns:
- the canonical label name: identifiers fold like any identifier, keywords uppercase
-
getText
-
qualifiedNameParts
The ordered identifier parts of a qualified name (db, schema, name), read from the parse tree's identifier list — the AST-definitive way — rather than by splitting its flattened text on '.'. Correct even when an identifier is double-quoted and itself contains a dot (whichgetText(qn).split("\\.")would mis-split).- Parameters:
ctx- the qualified-name parse tree- Returns:
- the canonical name parts in source order, one element per dotted level
-
extractStringLiteral
-
getOriginalText
-
parseDataType
public DataType parseDataType(FrostlakeParser.DataTypeNameContext ctx, FrostlakeParser.TypeParametersContext typeParams) -
parseLiteral
-
resolveCurrentSchema
-
getProceduralExecutor
-
executeScriptingFunctionBody
Execute aLANGUAGE SQLscalar UDF whose body is a Snowflake-Scripting block and yield the value its RETURN produced — live-verified:CREATE FUNCTION f() RETURNS INT AS $$ BEGIN RETURN 1; END $$thenSELECT f()is 1, and the block really runs (a body ofBEGIN RETURN 1; RETURN 2; ENDyields 1,BEGIN LET x INT := 5; RETURN x * 2; ENDyields 10, and a body with no RETURN at all yields NULL).Shares every mechanism with the stored-procedure CALL path above — bind the arguments as declared variables, parse the body with the engine's own lexer/parser, visit its statements, read the RETURN — but differs in the two ways a FUNCTION differs from a PROCEDURE:
- the scope is ISOLATED, because a function is its own execution context: it cannot see a calling procedure's variables, and its own must not touch them (live-verified both ways);
- the shared return state is saved and put back, because this body runs in the MIDDLE of evaluating an enclosing block's expression — consuming its own RETURN must not look to that block like a RETURN of its own.
- Parameters:
function- the SQL UDF whose body is the Snowflake-Scripting block to runargs- the already-evaluated argument values, bound positionally to the declared parameters- Returns:
- the value the body's RETURN produced, or null when the body never RETURNs
-