|
|
|
| Description |
| ADT for DB tables (data models).
|
|
| Synopsis |
|
|
|
| Documentation |
|
| (-:>) :: Model -> String -> SqlValue |
| Get specific field from model
|
|
| getfield :: String -> Model -> String |
|
| getPK :: Model -> Maybe String |
|
| isExternalField :: ModelField -> Bool |
| Check if this field is PrimaryKey, ForeignKey or CurrentDate
|
|
| foreignModel :: ColumnType -> Model |
| Connected model for foreign key
|
|
| foreignField :: ColumnType -> String |
| Connected foreign field for foreign key
|
|
| updateField :: [ModelField] -> String -> ColumnType -> SqlValue -> [ModelField] |
| Set one field value
|
|
| setCached :: Model -> String -> ColumnType -> SqlValue -> Model |
| Set given cached field in model
|
|
| record |
| :: Model | Empty model (with unfilled fields)
| | -> [SqlValue] | List of values
| | -> Model | Model with filled fields
| | Fill fields in Model from [SqlValue]
Do not fill id and current date fields
|
|
|
| record' :: Model -> [SqlValue] -> Model |
| Same as record, but fill all fields
|
|
| fieldName :: ModelField -> String |
| Get name of field
|
|
| fieldType :: ModelField -> ColumnType |
| Get type of field
|
|
| fieldValue :: ModelField -> SqlValue |
| Get value of field
|
|
| emptyModel :: Model |
|
| Produced by Haddock version 2.4.2 |