relational-query-0.8.3.6: 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

Untyped table type

type Untyped = Untyped Source #

Deprecated: prepare to drop public interface. internally use Database.Relational.Query.Internal.UntypedTable.*

Untyped typed table type

name' :: Untyped -> String Source #

Deprecated: prepare to drop public interface. internally use Database.Relational.Query.Internal.UntypedTable.*

Name string of table in SQL

width' :: Untyped -> Int Source #

Deprecated: prepare to drop public interface. internally use Database.Relational.Query.Internal.UntypedTable.*

Width of table

columns' :: Untyped -> [ColumnSQL] Source #

Deprecated: prepare to drop public interface. internally use Database.Relational.Query.Internal.UntypedTable.*

Column name strings in SQL

(!) :: Untyped -> Int -> ColumnSQL Source #

Deprecated: prepare to drop public interface. internally use Database.Relational.Query.Internal.UntypedTable.*

Column name strings in SQL

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.

Minimal complete definition

derivedTable