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

PostgREST.Request.Types

Synopsis

Documentation

data EmbedParam Source #

Constructors

EPHint Hint

Disambiguates an embedding operation when there's multiple relationships between two tables. Can be the name of a foreign key constraint, column name or the junction in an m2m relationship.

EPJoinType JoinType 

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

Instances details
Eq Filter Source # 
Instance details

Defined in PostgREST.Request.Types

Methods

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

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

type Hint = Text Source #

data CallParams Source #

Constructors

KeyParams [ProcParam]

Call with key params: func(a := val1, b:= val2)

OnePosParam ProcParam

Call with positional params(only one supported): func(val)

data JoinType Source #

Constructors

JTInner 
JTLeft 

Instances

Instances details
Eq JoinType Source # 
Instance details

Defined in PostgREST.Request.Types

data JsonOperand Source #

Represents the key(->key'`) or index(->1`::int`), the index is Text because we reuse our escaping functons and let pg do the casting with '1'::int

Constructors

JKey 

Fields

JIdx 

Fields

Instances

Instances details
Eq JsonOperand Source # 
Instance details

Defined in PostgREST.Request.Types

data JsonOperation Source #

Represents the single arrow -> or double arrow ->> operators

Constructors

JArrow 

Fields

J2Arrow 

Fields

Instances

Instances details
Eq JsonOperation Source # 
Instance details

Defined in PostgREST.Request.Types

type ListVal = [Text] Source #

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

data LogicOperator Source #

Constructors

And 
Or 

Instances

Instances details
Eq LogicOperator Source # 
Instance details

Defined in PostgREST.Request.Types

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

Instances

Instances details
Eq LogicTree Source # 
Instance details

Defined in PostgREST.Request.Types

data OpExpr Source #

Constructors

OpExpr Bool Operation 

Instances

Instances details
Eq OpExpr Source # 
Instance details

Defined in PostgREST.Request.Types

Methods

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

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

data Operation Source #

Constructors

Op Operator SingleVal 
In ListVal 
Is TrileanVal 
Fts Operator (Maybe Language) SingleVal 

Instances

Instances details
Eq Operation Source # 
Instance details

Defined in PostgREST.Request.Types

data OrderDirection Source #

Constructors

OrderAsc 
OrderDesc 

Instances

Instances details
Eq OrderDirection Source # 
Instance details

Defined in PostgREST.Request.Types

data OrderNulls Source #

Instances

Instances details
Eq OrderNulls Source # 
Instance details

Defined in PostgREST.Request.Types

data OrderTerm Source #

Instances

Instances details
Eq OrderTerm Source # 
Instance details

Defined in PostgREST.Request.Types

data ReadQuery Source #

Constructors

Select 

Fields

Instances

Instances details
Eq ReadQuery Source # 
Instance details

Defined in PostgREST.Request.Types

type SelectItem = (Field, Maybe Cast, Maybe Alias, Maybe Hint, Maybe JoinType) Source #

The select value in `/tbl?select=alias:field::cast`

type SingleVal = Text Source #

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

data TrileanVal Source #

Three-valued logic values

Instances

Instances details
Eq TrileanVal Source # 
Instance details

Defined in PostgREST.Request.Types