]> gitweb @ CieloNegro.org - blackboard-dns.git/blob - DDNS/DB/Records.hs
DB thingy
[blackboard-dns.git] / DDNS / DB / Records.hs
1 {-# OPTIONS_GHC -fcontext-stack44 #-}
2 -- NOTE: use GHC flag -fcontext-stack44 with this module if GHC < 6.8.1
3 ---------------------------------------------------------------------------
4 -- Generated by DB/Direct
5 ---------------------------------------------------------------------------
6 module DDNS.DB.Records where
7
8 import Database.HaskellDB.DBLayout
9
10 ---------------------------------------------------------------------------
11 -- Table type
12 ---------------------------------------------------------------------------
13
14 type Records =
15     (RecCons Name (Expr String)
16      (RecCons Zone (Expr String)
17       (RecCons RecType (Expr String)
18        (RecCons RecData (Expr String) RecNil))))
19
20 ---------------------------------------------------------------------------
21 -- Table
22 ---------------------------------------------------------------------------
23 records :: Table Records
24
25 records = baseTable "records" $
26           hdbMakeEntry Name #
27           hdbMakeEntry Zone #
28           hdbMakeEntry RecType #
29           hdbMakeEntry RecData
30
31 ---------------------------------------------------------------------------
32 -- Fields
33 ---------------------------------------------------------------------------
34 ---------------------------------------------------------------------------
35 -- Name Field
36 ---------------------------------------------------------------------------
37
38 data Name = Name
39
40 instance FieldTag Name where fieldName _ = "name"
41
42 name :: Attr Name String
43 name = mkAttr Name
44
45 ---------------------------------------------------------------------------
46 -- Zone Field
47 ---------------------------------------------------------------------------
48
49 data Zone = Zone
50
51 instance FieldTag Zone where fieldName _ = "zone"
52
53 zone :: Attr Zone String
54 zone = mkAttr Zone
55
56 ---------------------------------------------------------------------------
57 -- RecType Field
58 ---------------------------------------------------------------------------
59
60 data RecType = RecType
61
62 instance FieldTag RecType where fieldName _ = "recType"
63
64 recType :: Attr RecType String
65 recType = mkAttr RecType
66
67 ---------------------------------------------------------------------------
68 -- RecData Field
69 ---------------------------------------------------------------------------
70
71 data RecData = RecData
72
73 instance FieldTag RecData where fieldName _ = "recData"
74
75 recData :: Attr RecData String
76 recData = mkAttr RecData