Class GrantRevokeHandler

java.lang.Object
dev.frostlake.executor.commands.GrantRevokeHandler
All Implemented Interfaces:
CommandHandler

public class GrantRevokeHandler extends Object implements CommandHandler
Handles GRANT … and REVOKE … statements, extracted verbatim from SQLCommandVisitor.visitGrantStatement(dev.frostlake.parser.FrostlakeParser.GrantStatementContext) and SQLCommandVisitor.visitRevokeStatement(dev.frostlake.parser.FrostlakeParser.RevokeStatementContext). The visitSecurityStatement router stays on the visitor and dispatches into handleGrant(dev.frostlake.parser.FrostlakeParser.GrantStatementContext) / handleRevoke(dev.frostlake.parser.FrostlakeParser.RevokeStatementContext). Catalog mutations run against the injected Catalog; grant-authority checks go through queryExecutor.getSecurityManager(); parse-text extraction (getText) is reached through the visitor back-reference so its exact original behavior is preserved. The private privilegeName(org.antlr.v4.runtime.ParserRuleContext) helper moved along with the two statement bodies (it was used only by them).