Copyright | (c) Ole Krüger 2015-2016 |
---|---|
License | BSD3 |
Maintainer | Ole Krüger <ole@vprsm.de> |
Safe Haskell | None |
Language | Haskell2010 |
- data Value
- = Value {
- valueType :: Oid
- valueData :: ByteString
- valueFormat :: Format
- | NullValue
- = Value {
- data ColumnDescription = ColumnDescription {}
- makeColumnDescription :: ColumnDescription -> String
- sanitizeName :: Name -> String
- sanitizeName' :: Name -> String
- identField :: Name -> String
- identField' :: Name -> String
- class Column a where
- pack :: a -> Value
- unpack :: Value -> Maybe a
- describeColumn :: Proxy a -> ColumnDescription
Query parameter or value of a column - see pack
on how to generate Value
s manually but
conveniently.
Value | |
| |
NullValue |
data ColumnDescription Source
Description of a column
ColumnDescription | |
|
makeColumnDescription :: ColumnDescription -> String Source
Generate column description in SQL. Think CREATE TABLE
.
sanitizeName :: Name -> String Source
Generate the sanitized representation of a name.
sanitizeName' :: Name -> String Source
Similiar to "sanitizeName" but encloses the name in quotes.
identField :: Name -> String Source
Generate the name for the identifying field.
identField' :: Name -> String Source
Similiar to "identField" but encloses the name in quotes.
Column type
Pack column value.
unpack :: Value -> Maybe a Source
Unpack column value.
describeColumn :: Proxy a -> ColumnDescription Source
Descripe the column type.