relational-query-0.5.0.3: Typeful, Modular, Relational, algebraic query engine

Copyright2013 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Database.Relational.Query.Table

Contents

Description

This module defines table type which has table metadatas.

Synopsis

Untyped table type

data Untyped Source

Untyped typed table type

Instances

name' :: Untyped -> String Source

Name string of table in SQL

width' :: Untyped -> Int Source

Width of table

columns' :: Untyped -> [ColumnSQL] Source

Column name strings in SQL

(!) Source

Arguments

:: Untyped 
-> Int

Column index

-> ColumnSQL

Column name String in SQL

Column name string in SQL specified by index

Phantom typed table type

data Table r Source

Phantom typed table type

unType :: Table t -> Untyped Source

Untype table.

name :: Table r -> String Source

Name string of table in SQL

shortName :: Table r -> String Source

Not qualified name string of table in SQL

width :: Table r -> Int Source

Width of table

columns :: Table r -> [ColumnSQL] Source

Column name strings in SQL

index Source

Arguments

:: Table r 
-> Int

Column index

-> ColumnSQL

Column name String in SQL

Column name string in SQL specified by index

table :: String -> [String] -> Table r Source

Unsafely generate phantom typed table type.

toMaybe :: Table r -> Table (Maybe r) Source

Cast phantom type into Maybe type.

Table existence inference

class PersistableWidth r => TableDerivable r where Source

Inference rule of Table existence.