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.

data OrderByClause Source #

Instances

Instances details
FromJSON OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Generic OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Associated Types

type Rep OrderByClause 
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)))
Show OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

showsPrec :: Int -> OrderByClause -> ShowS #

show :: OrderByClause -> String

showList :: [OrderByClause] -> ShowS #

NFData OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

rnf :: OrderByClause -> () #

Eq OrderByClause Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

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
FromJSON FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Generic FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Associated Types

type Rep FunctionCall 
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)))
Show FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

showsPrec :: Int -> FunctionCall -> ShowS #

show :: FunctionCall -> String

showList :: [FunctionCall] -> ShowS #

NFData FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

Methods

rnf :: FunctionCall -> () #

Eq FunctionCall Source # 
Instance details

Defined in IHP.DataSync.DynamicQuery

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

FromJSON Condition Source # 
Instance details

FromJSON Join Source # 
Instance details

Methods

parseJSON :: Value -> Parser Join #

parseJSONList :: Value -> Parser [Join] #

omittedField :: Maybe Join #

FromJSON OrderByClause Source # 
Instance details

FromJSON OrderByDirection Source # 
Instance details

FromJSON Action Source # 
Instance details

Methods

parseJSON :: Value -> Parser Action #

parseJSONList :: Value -> Parser [Action] #

omittedField :: Maybe Action #