Class JoinGraph
java.lang.Object
com.kingsrook.qqq.backend.core.actions.metadata.JoinGraph
Represents the graph of table-to-table joins in a QQQ Instance, treating
each join as a non-directional edge between two tables.
The primary purpose of this class is to answer the question: "given a starting table, what other tables can be reached through joins, and via which paths?" This is used during instance enrichment and validation to discover multi-hop join paths (e.g., order → orderLine → item).
Key behaviors:
- Deduplication: If the instance defines both A → B and B → A joins (on the same fields), they are normalized into a single edge so the graph does not contain redundant paths.
- Flipped-join awareness: Even though duplicate joins are
collapsed into one edge, the
flippedJoinsmap remembers all original join names for each table pair, so thatJoinGraph.JoinConnectionList.matchesJoinPath(List, JoinGraph, QInstance)can match a path by any equivalent join name, not just the one stored in the edge. - Path-length limiting: To keep traversal performant on large
instances, paths longer than
maxPathLength(default 3) are pruned. This limit is configurable via the system propertyqqq.instance.joinGraph.maxPathLengthor environment variableQQQ_INSTANCE_JOIN_GRAPH_MAX_PATH_LENGTH.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JoinGraph
Constructor
-
-
Method Details
-
getJoinConnections
-