Class JoinPolicyRules

java.lang.Object
dev.frostlake.executor.JoinPolicyRules

public final class JoinPolicyRules extends Object
What a JOIN POLICY demands of a query's FROM clause: the protected table must be INNER joined to a DIFFERENT table on an equality between their columns.

Live answers three distinct sentences, which is why this returns one rather than a boolean — no join or an OUTER join is the generic violation, a join that cannot satisfy the constraint (a cross join, a comma join, a constant ON) names the unsatisfied constraint, and a self join is called a potential cross-join. All measured.

  • Field Details

  • Method Details

    • violation

      public static String violation(FrostlakeParser.TableExpressionContext from, String tableName)
      The refusal a FROM clause earns for a table under a join policy, or null when it satisfies one.
      Parameters:
      from - the FROM clause of the select that reads the table
      tableName - the protected table's name