pg-store-0.1.0: Simple storage interface to PostgreSQL

Copyright(c) Ole Krüger 2015-2016
LicenseBSD3
MaintainerOle Krüger <ole@vprsm.de>
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Store.Columns

Contents

Description

 

Synopsis

data Value Source #

Query parameter or value of a column - see pack on how to generate Values manually but conveniently.

Constructors

Value 

Fields

NullValue 

class Column a where Source #

Types which implement this type class may be used as column types.

Minimal complete definition

pack, unpack, columnTypeName

Methods

pack :: a -> Value Source #

Pack column value.

unpack :: Value -> Maybe a Source #

Unpack column value.

columnTypeName :: Proxy a -> String Source #

Name of the underlying SQL type.

columnAllowNull :: Proxy a -> Bool Source #

May the column be NULL?

columnCheck :: Proxy a -> String -> Maybe String Source #

A condition that must hold true for the column.

columnDescription :: Proxy a -> String -> String Source #

Generate column description in SQL. Think CREATE TABLE.

Instances

Column Bool Source # 
Column Int Source # 
Column Int8 Source # 
Column Int16 Source # 
Column Int32 Source # 
Column Int64 Source # 
Column Integer Source # 
Column Word Source # 
Column Word8 Source # 
Column Word16 Source # 
Column Word32 Source # 
Column Word64 Source # 
Column ByteString Source # 
Column ByteString Source # 
Column Text Source # 
Column Text Source # 
Column UTCTime Source # 
Column Value Source # 
Column [Char] Source # 
Column a => Column (Maybe a) Source # 
QueryTable a => Column (Reference a) Source #