graflo.hq.auto_join¶
Auto-JOIN generation for edge resources.
When a Resource's pipeline contains an EdgeActor whose edge has
match_source / match_target, and the source/target vertex types
have known table connectors, this module can auto-generate JoinClauses and
IS_NOT_NULL filters on the edge resource's table connector so that the
resulting SQL fetches fully resolved rows.
enrich_edge_connector_with_joins(resource, connector, bindings, vertex_config)
¶
Mutate connector in-place, adding JoinClauses + IS_NOT_NULL filters.
The function inspects the Resource's actor pipeline for EdgeActors and,
for each edge that declares match_source and match_target,
looks up the source / target vertex table connectors and primary keys to
construct LEFT JOINs and NOT-NULL guards.
If the connector already has joins, this function is a no-op (the user provided explicit join specs).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource
|
Resource
|
The Resource whose pipeline is inspected. |
required |
connector
|
TableConnector
|
The table connector to enrich (mutated in-place). |
required |
bindings
|
Bindings
|
The Bindings collection holding all vertex table connectors. |
required |
vertex_config
|
VertexConfig
|
VertexConfig for looking up primary keys. |
required |