Package dev.frostlake.executor.commands
Class DDLCommandHandler
java.lang.Object
dev.frostlake.executor.commands.DDLCommandHandler
- All Implemented Interfaces:
CommandHandler
Handler for DDL (Data Definition Language) commands:
CREATE, DROP, ALTER, USE, TRUNCATE, COMMENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExtract comment from comment clauseGet catalog instanceThe shared column/constraint parser, reused by ALTER TABLE ADD COLUMN so it honours DEFAULT / NOT NULL.Get query executor instanceDROP statements are handled byDropCommandHandler.voidsetStreamManager(StreamManager streamManager) voidsetTaskScheduler(TaskScheduler taskScheduler) Methods 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, getText, getText, qualifiedNameParts
-
Constructor Details
-
DDLCommandHandler
-
-
Method Details
-
setStreamManager
-
getColumnParser
The shared column/constraint parser, reused by ALTER TABLE ADD COLUMN so it honours DEFAULT / NOT NULL.- Returns:
- the column-definition parser this handler and its create handlers share
-
setTaskScheduler
-
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
-
extractComment
Description copied from interface:CommandHandlerExtract comment from comment clause- Specified by:
extractCommentin interfaceCommandHandler- Parameters:
ctx- theCOMMENT [=] '<text>'clause, or null when the statement carries none- Returns:
- the comment text with its single-quote or dollar-quote delimiters stripped, or null when the clause is absent
-
handleDropStatement
DROP statements are handled byDropCommandHandler.- Parameters:
ctx- the DROP statement's parse tree, forwarded unchanged- Returns:
- the drop handler's result (null — the executor renders the standard status message)
-
handleCreateStatement
-
handleAlterStatement
-
handleUseStatement
-
handleUndropStatement
-
applyWarehousePropertyPublic
public void applyWarehousePropertyPublic(Warehouse warehouse, FrostlakeParser.WarehousePropertyContext prop)
-