Permalink
Browse files

sqlOnlySettings

  • Loading branch information...
1 parent ad58910 commit dbb3eacda23cd8ffd9e527684da5c736c156e8ce @snoyberg snoyberg committed Dec 11, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 persistent-template/Database/Persist/TH.hs
@@ -20,6 +20,7 @@ module Database.Persist.TH
, mpsGeneric
, mkPersistSettings
, sqlSettings
+ , sqlOnlySettings
-- * Various other TH functions
, mkMigrate
, mkSave
@@ -128,6 +129,12 @@ mkPersistSettings t = MkPersistSettings
sqlSettings :: MkPersistSettings
sqlSettings = mkPersistSettings $ ConT ''SqlBackend
+-- | Same as 'sqlSettings', but set 'mpsGeneric' to @False@.
+--
+-- Since 1.1.1
+sqlOnlySettings :: MkPersistSettings
+sqlOnlySettings = sqlSettings { mpsGeneric = False }
+
recName :: Text -> Text -> Text
recName dt f = lowerFirst dt ++ upperFirst f

0 comments on commit dbb3eac

Please sign in to comment.