Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- readRequest :: Schema -> TableName -> Maybe Integer -> [Relationship] -> ApiRequest -> Either Error ReadRequest
- mutateRequest :: Schema -> TableName -> ApiRequest -> [FieldName] -> ReadRequest -> Either Error MutateRequest
- callRequest :: ProcDescription -> ApiRequest -> ReadRequest -> CallRequest
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.
mutateRequest :: Schema -> TableName -> ApiRequest -> [FieldName] -> ReadRequest -> Either Error MutateRequest Source #
callRequest :: ProcDescription -> ApiRequest -> ReadRequest -> CallRequest Source #