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

IHP.DataSync.DynamicQueryCompiler

Description

 
Synopsis

Documentation

data Renamer Source #

Constructors

Renamer 

compileQuery :: DynamicSQLQuery -> (Query, [Action]) Source #

camelCaseRenamer :: Renamer Source #

Default renamer used by DataSync.

Transforms JS inputs in camelCase to snake_case for the database and DB outputs in snake_case back to camelCase

unmodifiedRenamer :: Renamer Source #

Renamer that does not modify the column names

renameField :: Renamer -> Field -> Field Source #

When a Field is retrieved from the database, it's all in snake_case. This turns it into camelCase

compileQueryMapped :: DynamicSQLQuery -> (Query, [Action]) Source #

mapColumnNames :: (Text -> Text) -> DynamicSQLQuery -> DynamicSQLQuery Source #

Used to transform column names from camelCase to snake_case

Orphan instances

ToField DynamicValue Source # 
Instance details

Methods

toField :: DynamicValue -> Action