relational-query-0.9.4.1: 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 #

Phantom typed table type

unType :: Table t -> Untyped #

Untype table.

name :: Table r -> String #

Name string of table in SQL

shortName :: Table r -> String #

Not qualified name string of table in SQL

width :: Table r -> Int #

Width of table

columns :: Table r -> [StringSQL] #

Column name strings in SQL

index #

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 #

Unsafely generate phantom typed table type.

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

Cast phantom type into Maybe type.

recordWidth :: Table r -> PersistableRecordWidth r #

PersistableRecordWidth of table

Table existence inference

class PersistableWidth r => TableDerivable r where #

Inference rule of Table existence.

Minimal complete definition

derivedTable

Methods

derivedTable :: Table r #