Add comments to modules
This commit is contained in:
committed by
Steve Chávez
parent
86e460c5c4
commit
1037313e77
@@ -1,3 +1,11 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.DbRequestBuilder
|
||||||
|
Description : PostgREST database request builder
|
||||||
|
|
||||||
|
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.
|
||||||
|
-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE DuplicateRecordFields#-}
|
{-# LANGUAGE DuplicateRecordFields#-}
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.DbStructure
|
||||||
|
Description : PostgREST schema cache
|
||||||
|
|
||||||
|
This module contains queries that target PostgreSQL system catalogs, these are used to build the schema cache(DbStructure).
|
||||||
|
|
||||||
|
The schema cache is necessary for resource embedding, foreign keys are used for inferring the relationships between tables.
|
||||||
|
|
||||||
|
These queries are executed once at startup or when PostgREST is reloaded.
|
||||||
|
-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE QuasiQuotes #-}
|
{-# LANGUAGE QuasiQuotes #-}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.Error
|
||||||
|
Description : PostgREST error HTTP responses
|
||||||
|
-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE TypeSynonymInstances #-}
|
{-# LANGUAGE TypeSynonymInstances #-}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.Middleware
|
||||||
|
Description : Sets the PostgreSQL GUCs, role, search_path and pre-request function. Validates JWT.
|
||||||
|
-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.OpenAPI
|
||||||
|
Description : Generates the OpenAPI output
|
||||||
|
-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
module PostgREST.OpenAPI (
|
module PostgREST.OpenAPI (
|
||||||
encodeOpenAPI
|
encodeOpenAPI
|
||||||
, isMalformedProxyUri
|
, isMalformedProxyUri
|
||||||
, pickProxy
|
, pickProxy
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Arrow ((&&&))
|
import Control.Arrow ((&&&))
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.Parsers
|
||||||
|
Description : PostgREST parser combinators
|
||||||
|
|
||||||
|
This module is in charge of parsing all the querystring values in an url, e.g. the select, id, order in `/projects?select=id,name&id=eq.1&order=id,name.desc`.
|
||||||
|
-}
|
||||||
module PostgREST.Parsers where
|
module PostgREST.Parsers where
|
||||||
|
|
||||||
import Protolude hiding (try, intercalate, replace, option)
|
import Protolude hiding (try, intercalate, replace, option)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.RangeQuery
|
||||||
|
Description : Logic regarding the `Range` header and `limit`, `offset` querystring arguments.
|
||||||
|
-}
|
||||||
module PostgREST.RangeQuery (
|
module PostgREST.RangeQuery (
|
||||||
rangeParse
|
rangeParse
|
||||||
, rangeRequested
|
, rangeRequested
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
{-|
|
||||||
|
Module : PostgREST.Types
|
||||||
|
Description : PostgREST common types and functions used by the rest of the modules
|
||||||
|
-}
|
||||||
{-# LANGUAGE DuplicateRecordFields #-}
|
{-# LANGUAGE DuplicateRecordFields #-}
|
||||||
module PostgREST.Types where
|
module PostgREST.Types where
|
||||||
import Protolude
|
import Protolude
|
||||||
|
|||||||
Reference in New Issue
Block a user