Selecto.Builder.Retarget (Selecto v0.4.3)
SQL generation logic for Retarget functionality.
This module handles the construction of SQL queries that retarget from the source table to a target table while preserving existing filters through subqueries.
Link to this section Summary
Functions
Build the join chain subquery for connecting source to target.
Extract retarget conditions from existing filters to construct the subquery.
Link to this section Functions
Link to this function
build_join_chain_subquery(selecto, retarget_config, join_path)
@spec build_join_chain_subquery(Selecto.Types.t(), Selecto.Types.retarget_config(), [ atom() ]) :: {Selecto.Types.iodata_with_markers(), Selecto.Types.sql_params()}
Build the join chain subquery for connecting source to target.
Link to this function
build_retarget_query(selecto, opts \\ [])
@spec build_retarget_query( Selecto.Types.t(), keyword() ) :: Selecto.Types.builder_result()
Link to this function
extract_retarget_conditions(selecto, retarget_config, source_alias)
@spec extract_retarget_conditions( Selecto.Types.t(), Selecto.Types.retarget_config(), String.t() ) :: {Selecto.Types.iodata_with_markers(), Selecto.Types.sql_params()}
Extract retarget conditions from existing filters to construct the subquery.