Selecto.Builder.Retarget
(Selecto v0.4.5)
Copy Markdown
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.
Summary
Functions
Build the join chain subquery for connecting source to target.
Extract retarget conditions from existing filters to construct the subquery.
Functions
@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.
@spec build_retarget_query( Selecto.Types.t(), keyword() ) :: Selecto.Types.builder_result()
@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.