# `Selecto.Builder.SetOperations`

SQL generation for set operations (UNION, INTERSECT, EXCEPT).

This module handles the generation of SQL for combining multiple queries
using standard SQL set operations.

# `build_set_operations`

Build SQL for set operations in the query.

Returns {iodata, [params]} where iodata contains the set operation SQL
and params contains the bound parameters from all participating queries.

# `extract_set_operation_params`

Extract all parameters from set operation queries.

This ensures all bound parameters from participating queries are included
in the final parameter list.

# `has_set_operations?`

Check if the query has set operations that need special SQL handling.

# `should_apply_outer_order_by?`

Determine if ORDER BY should be applied to the entire set operation result.

In SQL, ORDER BY on set operations applies to the final combined result.

# `validate_set_operations_for_sql`

Validate that set operations are properly structured for SQL generation.

Returns :ok or {:error, reason}.

# `wrap_set_operation_query`

Wrap a query with set operations in proper parentheses for complex queries.

This is used when set operations need to be combined with ORDER BY, LIMIT, etc.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
