postgrest-0.4.4.0: REST API for any Postgres database

Safe HaskellNone
LanguageHaskell2010

PostgREST.Types

Synopsis

Documentation

data ContentType Source #

Enumeration of currently supported response content types

data PgArg Source #

Constructors

PgArg 

Fields

Instances

Eq PgArg Source # 

Methods

(==) :: PgArg -> PgArg -> Bool #

(/=) :: PgArg -> PgArg -> Bool #

Show PgArg Source # 

Methods

showsPrec :: Int -> PgArg -> ShowS #

show :: PgArg -> String #

showList :: [PgArg] -> ShowS #

data Table Source #

Instances

Eq Table Source # 

Methods

(==) :: Table -> Table -> Bool #

(/=) :: Table -> Table -> Bool #

Ord Table Source # 

Methods

compare :: Table -> Table -> Ordering #

(<) :: Table -> Table -> Bool #

(<=) :: Table -> Table -> Bool #

(>) :: Table -> Table -> Bool #

(>=) :: Table -> Table -> Bool #

max :: Table -> Table -> Table #

min :: Table -> Table -> Table #

Show Table Source # 

Methods

showsPrec :: Int -> Table -> ShowS #

show :: Table -> String #

showList :: [Table] -> ShowS #

data Relation Source #

The name Relation here is used with the meaning "What is the relation between the current node and the parent node". It has nothing to do with PostgreSQL referring to tables/views as relations.

newtype PayloadJSON Source #

An array of JSON objects that has been verified to have the same keys in every object

Constructors

PayloadJSON (Vector Object) 

data Proxy Source #

Constructors

Proxy 

Instances

Eq Proxy Source # 

Methods

(==) :: Proxy -> Proxy -> Bool #

(/=) :: Proxy -> Proxy -> Bool #

Show Proxy Source # 

Methods

showsPrec :: Int -> Proxy -> ShowS #

show :: Proxy -> String #

showList :: [Proxy] -> ShowS #

data OpExpr Source #

Constructors

OpExpr Bool Operation 

Instances

type SingleVal = Text Source #

Represents a single value in a filter, e.g. id=eq.singleval

type ListVal = [Text] Source #

Represents a list value in a filter, e.g. id=in.(val1,val2,val3)

data LogicTree Source #

Boolean logic expression tree e.g. "and(name.eq.N,or(id.eq.1,id.eq.2))" is:

And / name.eq.N Or / id.eq.1 id.eq.2

type Cast = Text Source #

newtype GucHeader Source #

Custom guc header, it's obtained by parsing the json in a: `SET LOCAL "response.headers" = '[{Set-Cookie: ".."}]'

Constructors

GucHeader (Text, Text) 

type RelationDetail = Text Source #

This type will hold information about which particular Relation between two tables to choose when there are multiple ones. Specifically, it will contain the name of the foreign key or the join table in many to many relations.

type EmbedPath = [Text] Source #

Path of the embedded levels, e.g "clients.projects.name=eq.." gives Path ["clients", "projects"]

data Filter Source #

Constructors

Filter 

Fields

Instances

toHeader :: ContentType -> Header Source #

Convert from ContentType to a full HTTP Header

toMime :: ContentType -> ByteString Source #

Convert from ContentType to a ByteString representing the mime type