Package dev.frostlake.executor.commands
Class BeginEndBlockHandler
java.lang.Object
dev.frostlake.executor.commands.BeginEndBlockHandler
- All Implemented Interfaces:
CommandHandler
Handles Snowflake Scripting
BEGIN … [EXCEPTION …] END blocks, extracted verbatim from
SQLCommandVisitor.visitBeginEndBlock(dev.frostlake.parser.FrostlakeParser.BeginEndBlockContext) together with its cohesive exception-handling helpers
(bindHandlerErrorVariables, shouldHandleException, matchesSnowflakeException —
each used only by this path). Statement execution recurses back through visitor.visit(...);
parse-text extraction (getOriginalText, getText) is reached through the visitor
back-reference. The procedural scope/return/cursor state lives on the injected
ProceduralExecutor, and cached result sets go through queryExecutor.getResultCache(),
so the exact original behavior is preserved.-
Constructor Summary
ConstructorsConstructorDescriptionBeginEndBlockHandler(Catalog catalog, QueryExecutor queryExecutor, SQLCommandVisitor visitor, ProceduralExecutor proceduralExecutor) -
Method Summary
Modifier and TypeMethodDescriptionGet catalog instanceGet query executor instanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.frostlake.executor.commands.CommandHandler
extractComment, extractComment, getText, getText, qualifiedNameParts
-
Constructor Details
-
BeginEndBlockHandler
public BeginEndBlockHandler(Catalog catalog, QueryExecutor queryExecutor, SQLCommandVisitor visitor, ProceduralExecutor proceduralExecutor)
-
-
Method Details
-
getCatalog
Description copied from interface:CommandHandlerGet catalog instance- Specified by:
getCatalogin interfaceCommandHandler- Returns:
- the engine's metastore catalog, holding the objects this handler reads and mutates
-
getQueryExecutor
Description copied from interface:CommandHandlerGet query executor instance- Specified by:
getQueryExecutorin interfaceCommandHandler- Returns:
- the engine's query executor, for handlers that run nested queries or need session state
-
handle
-