graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Backends.Postgres.Translate.Select.Internal.Extractor

Description

Extractors are a pair of an SQL expression and an alias; they get translated like "[SELECT ...] expr as alias"

Synopsis

Documentation

aggregateFieldsToExtractorExps :: forall pgKind. Backend ('Postgres pgKind) => TableIdentifier -> AggregateFields ('Postgres pgKind) SQLExp -> [(ColumnAlias, SQLExp)] Source #

Creates node extractors for all of the columns and computed fields used in aggregated fields. The ColumnAliases for all the extractors are namespaced aliases using the 'contextualize*` functions so that none of the extractors names will conflict with one another (for example, if a column name is the same as a field name (eg nodes))