orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Expr.GroupBy

Description

Since: 1.0.0.0

Synopsis

Documentation

data GroupByClause Source #

Type to represent a SQL group by clause. E.G.

GROUP BY team_name

GroupByClause provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression GroupByClause Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.GroupBy

groupByClause :: GroupByExpr -> GroupByClause Source #

Create a full SQL GROUP BY clause with the given expression.

Since: 1.0.0.0

data GroupByExpr Source #

Type to represent a SQL group by expression (the part that follows the GROUP BY in SQL). E.G.

team_name

GroupByExpr provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

appendGroupByExpr :: GroupByExpr -> GroupByExpr -> GroupByExpr Source #

Combines two GroupByExprs with a comma between them.

Since: 1.0.0.0

groupByColumnsExpr :: NonEmpty ColumnName -> GroupByExpr Source #

Create a GroupByExpr from the given ColumnNames.

Since: 1.0.0.0