Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sqlOnlySettings

  • Loading branch information...
commit dbb3eacda23cd8ffd9e527684da5c736c156e8ce 1 parent ad58910
@snoyberg snoyberg authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 persistent-template/Database/Persist/TH.hs
View
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.