]> gitweb @ CieloNegro.org - blackboard-dns.git/blobdiff - DDNS/DB/Records.hs
DB thingy
[blackboard-dns.git] / DDNS / DB / Records.hs
diff --git a/DDNS/DB/Records.hs b/DDNS/DB/Records.hs
new file mode 100644 (file)
index 0000000..9b2872a
--- /dev/null
@@ -0,0 +1,76 @@
+{-# OPTIONS_GHC -fcontext-stack44 #-}
+-- NOTE: use GHC flag -fcontext-stack44 with this module if GHC < 6.8.1
+---------------------------------------------------------------------------
+-- Generated by DB/Direct
+---------------------------------------------------------------------------
+module DDNS.DB.Records where
+
+import Database.HaskellDB.DBLayout
+
+---------------------------------------------------------------------------
+-- Table type
+---------------------------------------------------------------------------
+
+type Records =
+    (RecCons Name (Expr String)
+     (RecCons Zone (Expr String)
+      (RecCons RecType (Expr String)
+       (RecCons RecData (Expr String) RecNil))))
+
+---------------------------------------------------------------------------
+-- Table
+---------------------------------------------------------------------------
+records :: Table Records
+
+records = baseTable "records" $
+          hdbMakeEntry Name #
+          hdbMakeEntry Zone #
+          hdbMakeEntry RecType #
+          hdbMakeEntry RecData
+
+---------------------------------------------------------------------------
+-- Fields
+---------------------------------------------------------------------------
+---------------------------------------------------------------------------
+-- Name Field
+---------------------------------------------------------------------------
+
+data Name = Name
+
+instance FieldTag Name where fieldName _ = "name"
+
+name :: Attr Name String
+name = mkAttr Name
+
+---------------------------------------------------------------------------
+-- Zone Field
+---------------------------------------------------------------------------
+
+data Zone = Zone
+
+instance FieldTag Zone where fieldName _ = "zone"
+
+zone :: Attr Zone String
+zone = mkAttr Zone
+
+---------------------------------------------------------------------------
+-- RecType Field
+---------------------------------------------------------------------------
+
+data RecType = RecType
+
+instance FieldTag RecType where fieldName _ = "recType"
+
+recType :: Attr RecType String
+recType = mkAttr RecType
+
+---------------------------------------------------------------------------
+-- RecData Field
+---------------------------------------------------------------------------
+
+data RecData = RecData
+
+instance FieldTag RecData where fieldName _ = "recData"
+
+recData :: Attr RecData String
+recData = mkAttr RecData