Class CreateSecurityHandler

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

public class CreateSecurityHandler extends Object implements 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 Details

    • getCatalog

      public Catalog getCatalog()
      Description copied from interface: CommandHandler
      Get catalog instance
      Specified by:
      getCatalog in interface CommandHandler
      Returns:
      the engine's metastore catalog, holding the objects this handler reads and mutates
    • getQueryExecutor

      public QueryExecutor getQueryExecutor()
      Description copied from interface: CommandHandler
      Get query executor instance
      Specified by:
      getQueryExecutor in interface CommandHandler
      Returns:
      the engine's query executor, for handlers that run nested queries or need session state
    • handleCreateTag

      public Object handleCreateTag(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists)
    • 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

      public Object handleCreateContact(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists)
      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

      public Object handleCreateUser(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists)
    • handleCreateRole

      public Object handleCreateRole(FrostlakeParser.CreateStatementContext ctx, boolean ifNotExists)