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

Portabilityunknown
Stabilityexperimental
Maintainerex8k.hibino@gmail.com
Safe HaskellNone

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 -> StringSource

Name string of table in SQL

width' :: Untyped -> IntSource

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 -> UntypedSource

Untype table.

name :: Table r -> StringSource

Name string of table in SQL

shortName :: Table r -> StringSource

Not qualified name string of table in SQL

width :: Table r -> IntSource

Width of table

columns :: Table r -> [ColumnSQL]Source

Column name strings in SQL

indexSource

Arguments

:: Table r 
-> Int

Column index

-> ColumnSQL

Column name String in SQL

Column name string in SQL specified by index

table :: String -> [String] -> Table rSource

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 whereSource

Inference rule of Table existence.