|Copyright||HWT Group (c) 2003, firstname.lastname@example.org|
Defines the types of database columns, and functions for converting these between HSQL and internal formats
- type FieldDesc = (FieldType, Bool)
- data FieldType
- toHaskellType :: FieldType -> String
- class ExprType e where
- class ExprTypes r where
- queryFields :: (ShowLabels r, ExprTypes r) => Query (Rel r) -> [(String, FieldDesc)]
A database column type
Class which retrieves a field description from a given type. Instances are provided for most concrete types. Instances for Maybe automatically make the field nullable, and instances for all (Expr a) types where a has an ExprType instance allows type information to be recovered from a given column expression.
Class which returns a list of field descriptions. Gets the descriptions of all columns in a Record/query. Most useful when the columns associated with each field in a (Rel r) type must be recovered. Note that this occurs at the type level only and no values are inspected.