Package tilda.parsing.parts.helpers
Class JoinHelper.RefDef
- java.lang.Object
-
- tilda.parsing.parts.helpers.JoinHelper.RefDef
-
- Enclosing class:
- JoinHelper
protected static class JoinHelper.RefDef extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_signatureprotected ViewColumn_vc
-
Constructor Summary
Constructors Modifier Constructor Description protectedRefDef(ViewColumn vc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidduplicateFKError(ParserSession PS, ForeignKey FK, ForeignKey fk, JoinHelper.RefDef ref)protected booleanequals(JoinHelper.RefDef rhs)protected static intfindRef(java.util.List<JoinHelper.RefDef> refs, JoinHelper.RefDef ref)protected ForeignKeygetCompatibleRefDef(ParserSession PS, View V, java.util.List<JoinHelper.RefDef> refs)The auto-join logic for Tilda is to look for the nearest previously referenced table and check if there is an FK either forward or backward.protected static java.lang.Stringsignature(Base ref, java.lang.String as)java.lang.StringtoString()
-
-
-
Field Detail
-
_vc
protected final ViewColumn _vc
-
_signature
protected final java.lang.String _signature
-
-
Constructor Detail
-
RefDef
protected RefDef(ViewColumn vc)
-
-
Method Detail
-
equals
protected boolean equals(JoinHelper.RefDef rhs)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
signature
protected static java.lang.String signature(Base ref, java.lang.String as)
-
findRef
protected static int findRef(java.util.List<JoinHelper.RefDef> refs, JoinHelper.RefDef ref)
-
duplicateFKError
protected static void duplicateFKError(ParserSession PS, ForeignKey FK, ForeignKey fk, JoinHelper.RefDef ref)
-
getCompatibleRefDef
protected ForeignKey getCompatibleRefDef(ParserSession PS, View V, java.util.List<JoinHelper.RefDef> refs)
The auto-join logic for Tilda is to look for the nearest previously referenced table and check if there is an FK either forward or backward. For example:
- TableA.a1
- TableA.a2
- TableB.b1
- TableB.b2
- TableC.c1
- TableC.c2
- Parameters:
PS-V-refs-- Returns:
-
-