Record Class JoinPath
java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.graph.internal.JoinPath
- Record Components:
edges- the relationship edges on this path, in a deterministic order; empty for a single-relation (no-join) pathrelations- every relation this path touches, deduplicated bygraph keyin first-appearance order; never empty
One connected join path through the
SchemaGraph: an ordered set of
Relationship edges spanning a set of terminal relations, plus the
relations those edges touch.
A path is the output of SchemaGraphSearch: the minimal connected
subgraph (Steiner tree) that ties the query's terminals together. Its
edges() carry everything mechanical join assembly needs — the join
columns (positional, composite keys intact) and the multiplicity bounds — and
its relationshipNames() are the vocabulary relix-ask uses to phrase a
"did you mean?" when the search returns more than one path.
The degenerate path is a single terminal with no edges (a query that names
columns from one relation): edges() empty, relations() the
lone relation.
-
Constructor Summary
ConstructorsConstructorDescriptionJoinPath(List<Relationship> edges, List<RelationSymbol> relations) Creates an instance of aJoinPathrecord class. -
Method Summary
Modifier and TypeMethodDescriptionedges()Returns the value of theedgesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.The graph keys of every relation on this path, in first-appearance order.Returns the value of therelationsrecord component.The names of the relationships traversed, in edge order — the speakable vocabulary for a "did you mean?" when the search is ambiguous (answerable only because edges are named).intThe number of relations (tables) this path joins — the resultant relation's breadth.final StringtoString()Returns a string representation of this record class.booleantrivial()True if this path joins nothing — a single relation, no edges.
-
Constructor Details
-
Method Details
-
tableCount
public int tableCount()The number of relations (tables) this path joins — the resultant relation's breadth. -
trivial
public boolean trivial()True if this path joins nothing — a single relation, no edges. -
relationshipNames
The names of the relationships traversed, in edge order — the speakable vocabulary for a "did you mean?" when the search is ambiguous (answerable only because edges are named). -
relationKeys
The graph keys of every relation on this path, in first-appearance order. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
edges
Returns the value of theedgesrecord component.- Returns:
- the value of the
edgesrecord component
-
relations
Returns the value of therelationsrecord component.- Returns:
- the value of the
relationsrecord component
-