PgRest.AST.Aggregate (PgRest v0.2.0)

Copy Markdown View Source

A select= aggregate: count(), col.sum(), alias:col::text.avg()::int.

field is nil for a bare count(). input_cast is the cast applied to the column before aggregating, cast the cast applied to the result.

Summary

Types

fun()

@type fun() :: :count | :sum | :avg | :min | :max

t()

@type t() :: %PgRest.AST.Aggregate{
  alias: String.t() | nil,
  cast: String.t() | nil,
  field: PgRest.AST.Field.t() | nil,
  fun: fun(),
  input_cast: String.t() | nil
}