Class RowAccessPolicyAttachment

java.lang.Object
dev.frostlake.executor.commands.RowAccessPolicyAttachment

public final class RowAccessPolicyAttachment extends Object
The checks a row access policy attachment must pass, shared by the ALTER form and the CREATE TABLE / CREATE VIEW clauses — live makes the same ones wherever the attachment is written, with a single measured difference: an unknown column is an invalid identifier on the ALTER path and a column 'X' does not exist at CREATE, so the caller reports that one.
  • Method Details

    • require

      public static RowAccessPolicy require(Catalog catalog, String policyName)
      The policy a name resolves to, refused when it resolves to nothing.
      Parameters:
      catalog - the catalog to resolve in
      policyName - the policy name as written
    • check

      public static void check(RowAccessPolicy policy, Table table, String objectName, String policyName, List<String> columns)
      The argument-count, masked-column and type checks, in live's order. The columns must already be known to exist — resolving them is the caller's job, because the two paths word that refusal differently.