| 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.
- data Config
- defaultConfig :: Config
- productUnitSupport :: Config -> ProductUnitSupport
- chunksInsertSize :: Config -> Int
- schemaNameMode :: Config -> SchemaNameMode
- normalizedTableName :: Config -> Bool
- verboseAsCompilerWarning :: Config -> Bool
- disableOverloadedProjection :: Config -> Bool
- disableSpecializedProjection :: Config -> Bool
- identifierQuotation :: Config -> IdentifierQuotation
- nameConfig :: Config -> NameConfig
- data NameConfig = NameConfig {
- recordConfig :: NameConfig
- relationVarName :: String -> String -> VarName
- defaultNameConfig :: NameConfig
- data ProductUnitSupport
- data SchemaNameMode
- data IdentifierQuotation
Configuration type for query
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
, 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"
}
}
chunksInsertSize :: Config -> Int Source #
normalizedTableName :: Config -> Bool Source #
If True, schema names become uppercase, and table names become lowercase.
verboseAsCompilerWarning :: Config -> Bool Source #
If True, more detailed logs are printed when generating record types from schema.
disableOverloadedProjection :: Config -> Bool Source #
If True, instance of HasProjection for each column is NOT generated.
disableSpecializedProjection :: Config -> Bool Source #
If True, Pi for each column is NOT generated.
nameConfig :: Config -> NameConfig Source #
data NameConfig Source #
NameConfig type to customize names of expanded templates.
Constructors
| NameConfig | |
Fields
| |
Instances
defaultNameConfig :: NameConfig Source #
Default implementation of NameConfig type.
data ProductUnitSupport Source #
Unit of product is supported or not.
Constructors
| PUSupported | |
| PUNotSupported |
Instances
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
data IdentifierQuotation Source #
Configuration for quotation of identifiers of SQL.
Constructors
| NoQuotation | |
| Quotation Char |
Instances