packages feed

postgresql-query 1.3.1 → 1.4.0

raw patch · 3 files changed

+18/−12 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # CHANGELOG +## 1.4.1+### Changed+* `eoDeriveClasse` renamed to `eoDeriveClasses`+### Added+* Grammar added to documentation+ ## 1.3.1 ### Changed * work with `hset-1.0.0`
postgresql-query.cabal view
@@ -1,5 +1,5 @@ name:                postgresql-query-version:             1.3.1+version:             1.4.0  synopsis: Sql interpolating quasiquote plus some kind of primitive ORM           using it
src/Database/PostgreSQL/Query/TH.hs view
@@ -133,7 +133,7 @@ data EntityOptions = EntityOptions     { eoTableName      :: String -> String -- ^ Type name to table name converter     , eoColumnNames    :: String -> String -- ^ Record field to column name converter-    , eoDeriveClassess :: [Name]           -- ^ Typeclasses to derive for Id+    , eoDeriveClasses  :: [Name]           -- ^ Typeclasses to derive for Id     , eoIdType         :: Name             -- ^ Base type for Id     } @@ -141,7 +141,7 @@     def = EntityOptions         { eoTableName = id         , eoColumnNames = id-        , eoDeriveClassess = [''Ord, ''Eq, ''Show]+        , eoDeriveClasses = [''Ord, ''Eq, ''Show]         , eoIdType = ''Integer         } @@ -156,10 +156,10 @@     } deriving (Ord, Eq, Show)  $(deriveEntity-  def { eoIdType      = ''Id-      , eoTableName   = toUnderscore-      , eoColumnNames = toUnderscore . drop 1-      , eoDeriveClassess =+  def { eoIdType        = ''Id+      , eoTableName     = toUnderscore+      , eoColumnNames   = toUnderscore . drop 1+      , eoDeriveClasses =         [''Show, ''Read, ''Ord, ''Eq         , ''FromField, ''ToField, ''PathPiece]       }@@ -195,7 +195,7 @@         idcon = RecC (mkName idname)                 [(mkName unidname, NotStrict, idtype)]         iddec = NewtypeInstD [] entityIdName [ConT tname]-                idcon (eoDeriveClassess opts)+                idcon (eoDeriveClasses opts)         tblName = eoTableName opts tnames         fldNames = map (eoColumnNames opts . nameBase) $ cFieldNames tcon     VarE ntableName  <- [e|tableName|]@@ -217,10 +217,10 @@     } deriving (Ord, Eq, Show)  $(deriveEverything-  def { eoIdType      = ''Id-      , eoTableName   = toUnderscore-      , eoColumnNames = toUnderscore . drop 1-      , eoDeriveClassess =+  def { eoIdType        = ''Id+      , eoTableName     = toUnderscore+      , eoColumnNames   = toUnderscore . drop 1+      , eoDeriveClasses =         [''Show, ''Read, ''Ord, ''Eq         , ''FromField, ''ToField, ''PathPiece]       }