Package dev.frostlake.executor.commands
Class CreateSecurityHandler
java.lang.Object
dev.frostlake.executor.commands.CreateSecurityHandler
- All Implemented Interfaces:
CommandHandler
Handles CREATE for security / governance objects — TAG, MASKING POLICY, ROW ACCESS POLICY, USER, ROLE —
extracted from
DDLCommandHandler, which keeps the CREATE dispatch and delegates here. Column/type
parsing is delegated to ColumnDefinitionParser; shared schema helpers via the ddl back-ref.-
Method Summary
Modifier and TypeMethodDescriptionGet catalog instanceGet query executor instancehandleCreateAggregationPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE AGGREGATION POLICY — the same shape as a projection policy, with its own two refusals and a body answering AGGREGATION_CONSTRAINT(MIN_GROUP_SIZE => n) or NO_AGGREGATION_CONSTRAINT().handleCreateContact(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE CONTACT — a schema-level object with three string properties and no behaviour.handleCreateJoinPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE JOIN POLICY — the third policy kind with a zero-argument signature and a constraint body, here answering JOIN_CONSTRAINT(JOIN_REQUIRED => …).handleCreateMaskingPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateProjectionPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE PROJECTION POLICY — zero arguments, a body returning PROJECTION_CONSTRAINT, and no behaviour of its own until a column is attached to it.handleCreateRole(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateRowAccessPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateTag(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) handleCreateUser(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) 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, extractComment, getText, getText, qualifiedNameParts
-
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
-
handleCreateTag
-
handleCreateMaskingPolicy
public Object handleCreateMaskingPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) -
handleCreateRowAccessPolicy
public Object handleCreateRowAccessPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) -
handleCreateJoinPolicy
public Object handleCreateJoinPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE JOIN POLICY — the third policy kind with a zero-argument signature and a constraint body, here answering JOIN_CONSTRAINT(JOIN_REQUIRED => …). -
handleCreateAggregationPolicy
public Object handleCreateAggregationPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE AGGREGATION POLICY — the same shape as a projection policy, with its own two refusals and a body answering AGGREGATION_CONSTRAINT(MIN_GROUP_SIZE => n) or NO_AGGREGATION_CONSTRAINT(). -
handleCreateProjectionPolicy
public Object handleCreateProjectionPolicy(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists) CREATE PROJECTION POLICY — zero arguments, a body returning PROJECTION_CONSTRAINT, and no behaviour of its own until a column is attached to it. Both refusals are live's: a signature with any argument at all, and a declared return type that is not PROJECTION_CONSTRAINT. -
handleCreateContact
CREATE CONTACT — a schema-level object with three string properties and no behaviour. COMMENT, URL and EMAIL_DISTRIBUTION_LIST are the ones live takes; anything else is refused the way live refuses a property an object type does not have (invalid property 'EMAIL' for 'CONTACT'). -
handleCreateUser
-
handleCreateRole
-