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

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

Database.Relational.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

Instances
Show (Table r) Source # 
Instance details

Defined in Database.Relational.Table

Methods

showsPrec :: Int -> Table r -> ShowS #

show :: Table r -> String #

showList :: [Table r] -> ShowS #

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.

recordWidth :: Table r -> PersistableRecordWidth r Source #

PersistableRecordWidth of table

toSubQuery Source #

Arguments

:: Table r

Typed Table metadata

-> SubQuery

Result SubQuery

Table existence inference

class PersistableWidth r => TableDerivable r where Source #

Inference rule of Table existence.