Skip to main content

Module funcs

Module funcs 

Source
Expand description

SQL function and expression helpers for typed queries.

Modules§

array
PostgreSQL SQL array expression helpers.
json
Portable JSON expression helpers.
postgres
PostgreSQL-specific typed SQL helpers.

Functions§

avg
Creates a typed AVG(…) expression.
case
Starts a typed SQL CASE expression.
coalesce
Creates a typed COALESCE(expr, fallback) expression.
count
Creates a typed COUNT(…) expression.
count_all
Creates a typed COUNT(*) expression.
cume_dist
Creates a typed CUME_DIST() window function.
current_row
Window frame bound CURRENT ROW.
custom
Creates a typed custom expression.
dense_rank
Creates a typed DENSE_RANK() window function.
first_value
Creates a typed FIRST_VALUE(expr) window function.
following
Window frame bound n FOLLOWING.
func
Creates a typed database function expression.
lag
Creates a typed LAG(expr) window function.
lag_by
Creates a typed LAG(expr, offset) window function.
lag_or
Creates a typed LAG(expr, offset, default) window function.
last_value
Creates a typed LAST_VALUE(expr) window function.
lead
Creates a typed LEAD(expr) window function.
lead_by
Creates a typed LEAD(expr, offset) window function.
lead_or
Creates a typed LEAD(expr, offset, default) window function.
max
Creates a typed MAX(…) expression.
min
Creates a typed MIN(…) expression.
now
Creates a typed CURRENT_TIMESTAMP expression.
nth_value
Creates a typed NTH_VALUE(expr, n) window function.
ntile
Creates a typed NTILE(n) window function.
percent_rank
Creates a typed PERCENT_RANK() window function.
preceding
Window frame bound n PRECEDING.
range_between
Creates a RANGE BETWEEN ... AND ... window frame.
rank
Creates a typed RANK() window function.
row_number
Creates a typed ROW_NUMBER() window function.
rows_between
Creates a ROWS BETWEEN ... AND ... window frame.
sum
Creates a typed SUM(…) expression.
unbounded_following
Window frame bound UNBOUNDED FOLLOWING.
unbounded_preceding
Window frame bound UNBOUNDED PRECEDING.
window
Starts an empty SQL window specification.