| Copyright | 2013-2017 Kei Hibino |
|---|---|
| License | BSD3 |
| Maintainer | ex8k.hibino@gmail.com |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.Relational.Config
Contents
Description
This module provides untyped components for query.
Synopsis
Configuration type for query
Configuration type.
data IdentifierQuotation Source #
Configuration for quotation of identifiers of SQL.
Constructors
| NoQuotation | |
| Quotation Char |
Instances
| Show IdentifierQuotation Source # | |
Defined in Database.Relational.Internal.Config Methods showsPrec :: Int -> IdentifierQuotation -> ShowS # show :: IdentifierQuotation -> String # showList :: [IdentifierQuotation] -> ShowS # | |
data SchemaNameMode Source #
Schema name qualify mode in SQL string.
Constructors
| SchemaQualified | Schema qualified table name in SQL string |
| SchemaNotQualified | Not qualified table name in SQL string |
Instances
| Eq SchemaNameMode Source # | |
Defined in Database.Relational.Internal.Config Methods (==) :: SchemaNameMode -> SchemaNameMode -> Bool # (/=) :: SchemaNameMode -> SchemaNameMode -> Bool # | |
| Show SchemaNameMode Source # | |
Defined in Database.Relational.Internal.Config Methods showsPrec :: Int -> SchemaNameMode -> ShowS # show :: SchemaNameMode -> String # showList :: [SchemaNameMode] -> ShowS # | |
data ProductUnitSupport Source #
Unit of product is supported or not.
Constructors
| PUSupported | |
| PUNotSupported |
Instances
| Show ProductUnitSupport Source # | |
Defined in Database.Relational.Internal.Config Methods showsPrec :: Int -> ProductUnitSupport -> ShowS # show :: ProductUnitSupport -> String # showList :: [ProductUnitSupport] -> ShowS # | |
data NameConfig Source #
NameConfig type to customize names of expanded templates.
Instances
| Show NameConfig Source # | |
Defined in Database.Relational.Internal.Config Methods showsPrec :: Int -> NameConfig -> ShowS # show :: NameConfig -> String # showList :: [NameConfig] -> ShowS # | |
defaultNameConfig :: NameConfig Source #
Default implementation of NameConfig type.
defaultConfig :: Config Source #
Default configuration of Config.
To change some behaviour of relational-query,
use record update syntax:
defaultConfig
{ productUnitSupport = PUSupported
, chunksInsertSize = 256
, schemaNameMode = SchemaQualified
, normalizedTableName = True
, addQueryTableAliasAS = False
, addModifyTableAliasAS = False
, enableWarning = True
, verboseAsCompilerWarning = False
, disableOverloadedProjection = False
, disableSpecializedProjection = False
, identifierQuotation = NoQuotation
, nameConfig =
defaultNameConfig
{ recordConfig = defaultNameConfig
, relationVarName = \schema table -> varCamelcaseName $ table ++ "_" ++ scheme
-- ^ append the table name after the schema name. e.g. "schemaTable"
}
}