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

PostgREST.Request.Types

Synopsis

Documentation

type EmbedHint = Text Source #

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.

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 #

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

Show 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 
Fts Operator (Maybe Language) SingleVal 

Instances

Instances details
Eq Operation Source # 
Instance details

Defined in PostgREST.Request.Types

data OrderNulls Source #

Instances

Instances details
Eq OrderNulls Source # 
Instance details

Defined in PostgREST.Request.Types

Show 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 EmbedHint) 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