Package dev.frostlake.executor
Class JoinPolicyRules
java.lang.Object
dev.frostlake.executor.JoinPolicyRules
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringviolation(FrostlakeParser.TableExpressionContext from, String tableName) The refusal a FROM clause earns for a table under a join policy, or null when it satisfies one.
-
Field Details
-
NO_JOIN
The generic refusal: nothing was joined, or the join was an outer one.- See Also:
-
UNSATISFIED
A join is there, but cannot satisfy the policy.- See Also:
-
SELF_JOIN
The protected table joined to itself.- See Also:
-
-
Method Details
-
violation
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 tabletableName- the protected table's name
-