Selecto.Builder.Window (Selecto v0.3.16)

Builds SQL for window functions.

This module handles the generation of SQL for window functions including:

  • Ranking functions (ROW_NUMBER, RANK, DENSE_RANK)
  • Offset functions (LAG, LEAD, FIRST_VALUE, LAST_VALUE)
  • Aggregate functions with OVER clause
  • Window frame specifications

Link to this section Summary

Functions

Build window function SQL for SELECT clause.

Link to this section Functions

Link to this function

build_window_functions(selecto)

@spec build_window_functions(Selecto.Types.t()) :: {[String.t()], iolist(), [any()]}

Build window function SQL for SELECT clause.

Returns iodata for window functions that can be appended to the SELECT clause.