postgrest-9.0.0: REST API for any Postgres database
Safe HaskellNone
LanguageHaskell2010

PostgREST.Request.DbRequestBuilder

Description

This module is in charge of building an intermediate representation(ReadRequest, MutateRequest) between the HTTP request and the final resulting SQL query.

A query tree is built in case of resource embedding. By inferring the relationship between tables, join conditions are added for every embedded resource.

Synopsis

Documentation

readRequest :: Schema -> TableName -> Maybe Integer -> [Relationship] -> ApiRequest -> Either Error ReadRequest Source #

Builds the ReadRequest tree on a number of stages. | Adds filters, order, limits on its respective nodes. | Adds joins conditions obtained from resource embedding.