Copyright | (c) digitally induced GmbH 2021 |
---|---|
Safe Haskell | None |
Synopsis
- data Renamer = Renamer {
- fieldToColumn :: Text -> Text
- columnToField :: Text -> Text
- compileQuery :: DynamicSQLQuery -> (Query, [Action])
- compileQueryWithRenamer :: Renamer -> DynamicSQLQuery -> (Query, [Action])
- camelCaseRenamer :: Renamer
- unmodifiedRenamer :: Renamer
- renameField :: Renamer -> Field -> Field
- compileQueryMapped :: DynamicSQLQuery -> (Query, [Action])
- mapColumnNames :: (Text -> Text) -> DynamicSQLQuery -> DynamicSQLQuery
- compileOrderByClause :: OrderByClause -> Text
- compileSelectedColumns :: SelectedColumns -> Action
- compileCondition :: ConditionExpression -> (Query, [Action])
- compileOperator :: ConditionOperator -> Query
Documentation
Renamer | |
|
compileQuery :: DynamicSQLQuery -> (Query, [Action]) Source #
compileQueryWithRenamer :: Renamer -> 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
compileSelectedColumns :: SelectedColumns -> Action Source #
compileCondition :: ConditionExpression -> (Query, [Action]) Source #
compileOperator :: ConditionOperator -> Query Source #
Orphan instances
ToField DynamicValue Source # | |
toField :: DynamicValue -> Action |