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

Copyright2013-2017 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

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 -> [StringSQL] Source #

Column name strings in SQL

index Source #

Arguments

:: Table r 
-> Int

Column index

-> StringSQL

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.

Minimal complete definition

derivedTable