{-# OPTIONS_GHC -fcontext-stack43 #-} -- NOTE: use GHC flag -fcontext-stack43 with this module if GHC < 6.8.1 --------------------------------------------------------------------------- -- Generated by DB/Direct --------------------------------------------------------------------------- module ShareGuardDB.Directory where import Database.HaskellDB.DBLayout --------------------------------------------------------------------------- -- Table type --------------------------------------------------------------------------- type Directory = (RecCons Id (Expr Integer) (RecCons Name (Expr String) (RecCons Owner_id (Expr Integer) RecNil))) --------------------------------------------------------------------------- -- Table --------------------------------------------------------------------------- directory :: Table Directory directory = baseTable "directory" $ hdbMakeEntry Id # hdbMakeEntry Name # hdbMakeEntry Owner_id --------------------------------------------------------------------------- -- Fields --------------------------------------------------------------------------- --------------------------------------------------------------------------- -- Id Field --------------------------------------------------------------------------- data Id = Id instance FieldTag Id where fieldName _ = "id" xid :: Attr Id Integer xid = mkAttr Id --------------------------------------------------------------------------- -- Name Field --------------------------------------------------------------------------- data Name = Name instance FieldTag Name where fieldName _ = "name" name :: Attr Name String name = mkAttr Name --------------------------------------------------------------------------- -- Owner_id Field --------------------------------------------------------------------------- data Owner_id = Owner_id instance FieldTag Owner_id where fieldName _ = "owner_id" owner_id :: Attr Owner_id Integer owner_id = mkAttr Owner_id