IHP Api Reference
Copyright(c) digitally induced GmbH 2021
Safe HaskellNone

IHP.DataSync.DynamicQuery

Description

 
Synopsis

Documentation

data Field Source #

Constructors

Field 

Instances

Instances details
FromField Field Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

fromField :: FieldParser Field

ToJSON [Field] Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

data DynamicSQLQuery Source #

Similiar to IHP.QueryBuilder.SQLQuery, but is designed to be accessed by external users

When compiling to SQL we have to be extra careful to escape all identifers and variables in the query. The normal IHP.QueryBuilder doesn't need to be that careful as parts of the input are derived from generated code from the Schema.sql.

Instances

Instances details
Eq DynamicSQLQuery Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Show DynamicSQLQuery Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

FromJSON DynamicSQLQuery Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

data OrderByClause Source #

Instances

Instances details
Eq OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Show OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

showsPrec :: Int -> OrderByClause -> ShowS #

show :: OrderByClause -> String

showList :: [OrderByClause] -> ShowS #

Generic OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Associated Types

type Rep OrderByClause :: Type -> Type

NFData OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

rnf :: OrderByClause -> () #

FromJSON OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

parseJSON :: Value -> Parser OrderByClause #

parseJSONList :: Value -> Parser [OrderByClause] #

ParamReader OrderByClause Source # 
Instance details

Defined in IHP.DataSync.REST.Controller

type Rep OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

type Rep OrderByClause = D1 ('MetaData "OrderByClause" "IHP.DataSync.DynamicQuery" "main" 'False) (C1 ('MetaCons "OrderByClause" 'PrefixI 'True) (S1 ('MetaSel ('Just "orderByColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "orderByDirection") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OrderByDirection)) :+: C1 ('MetaCons "OrderByTSRank" 'PrefixI 'True) (S1 ('MetaSel ('Just "tsvector") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tsquery") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data FunctionCall Source #

Constructors

ToTSQuery

to_tsquery(english, text)

Fields

Instances

Instances details
Eq FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Show FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

showsPrec :: Int -> FunctionCall -> ShowS #

show :: FunctionCall -> String

showList :: [FunctionCall] -> ShowS #

Generic FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Associated Types

type Rep FunctionCall :: Type -> Type

NFData FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

rnf :: FunctionCall -> () #

FromJSON FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

parseJSON :: Value -> Parser FunctionCall #

parseJSONList :: Value -> Parser [FunctionCall] #

type Rep FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

type Rep FunctionCall = D1 ('MetaData "FunctionCall" "IHP.DataSync.DynamicQuery" "main" 'False) (C1 ('MetaCons "ToTSQuery" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data ConditionOperator Source #

Operators available in WHERE conditions

Constructors

OpEqual

a = b

OpGreaterThan

a > b

OpLessThan

a < b

OpGreaterThanOrEqual

a >= b

OpLessThanOrEqual

a <= b

OpNotEqual

a <> b

OpAnd

a AND b

OpOr

a OR b

OpIs

a IS b

OpIsNot

a IS NOT b

OpTSMatch

tsvec_a @@ tsvec_b

OpIn

a IN b

recordIds :: [[Field]] -> [UUID] Source #

Returns a list of all id's in a result

transformColumnNamesToFieldNames :: Value -> Value Source #

Transforms the keys of a JSON object from field name to column name

>>> transformColumnNamesToFieldNames [json|{"isCompleted": true}|]
[json|{"is_completed": true}|]

Orphan instances

FromJSON ByteString Source # 
Instance details

Methods

parseJSON :: Value -> Parser ByteString #

parseJSONList :: Value -> Parser [ByteString] #

FromJSON Action Source # 
Instance details

Methods

parseJSON :: Value -> Parser Action #

parseJSONList :: Value -> Parser [Action] #

FromJSON OrderByDirection Source # 
Instance details

FromJSON Join Source # 
Instance details

Methods

parseJSON :: Value -> Parser Join #

parseJSONList :: Value -> Parser [Join] #

FromJSON Condition Source # 
Instance details

Methods

parseJSON :: Value -> Parser Condition #

parseJSONList :: Value -> Parser [Condition] #

FromJSON OrderByClause Source # 
Instance details

Methods

parseJSON :: Value -> Parser OrderByClause #

parseJSONList :: Value -> Parser [OrderByClause] #