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

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] #