SelectoComponents.DenormalizationDetector (selecto_components v0.4.5)
Detects columns that would cause denormalization (row multiplication) in query results. Groups columns by their relationship path to enable subselect generation.
Link to this section Summary
Functions
Analyzes a Selecto query to detect potential denormalization based on joins
Detects columns that would cause denormalization and groups them by relationship.
Groups columns by their relationship path for subselect generation
Checks if a specific column would cause denormalization
Link to this section Functions
analyze_query(selecto)
Analyzes a Selecto query to detect potential denormalization based on joins
detect_and_group_columns(selecto, selected_columns)
Detects columns that would cause denormalization and groups them by relationship.
Returns a tuple of {normal_columns, denormalizing_groups} where denormalizing_groups is a map of relationship_path => columns
group_columns_by_relationship(selecto, columns)
Groups columns by their relationship path for subselect generation
is_denormalizing_column?(selecto, field)
Checks if a specific column would cause denormalization