packages feed

relational-record-examples 0.3.2.1 → 0.4.0.0

raw patch · 4 files changed

+15/−13 lines, 4 filesdep +product-isomorphicdep ~persistable-recorddep ~relational-querydep ~relational-query-HDBCPVP ok

version bump matches the API change (PVP)

Dependencies added: product-isomorphic

Dependency ranges changed: persistable-record, relational-query, relational-query-HDBC, relational-schemas

API changes (from Hackage documentation)

Files

lib/Database/Relational/Query/SQLite3.hs view
@@ -7,7 +7,7 @@   , module Database.HDBC.Session   , module Database.HDBC.Sqlite3   , module Database.Record-  , module Database.Relational.Query+  , module Database.Relational   , runRelation   ) where @@ -17,7 +17,7 @@ import Database.HDBC.Session import Database.HDBC.Sqlite3 import Database.Record hiding (unique)-import Database.Relational.Query hiding (unique)+import Database.Relational hiding (unique)  runRelation :: (ToSql SqlValue p,                IConnection conn,
relational-record-examples.cabal view
@@ -1,5 +1,5 @@ name:                relational-record-examples-version:             0.3.2.1+version:             0.4.0.0 synopsis:            Examples of Haskell Relationa Record description:         Provides examples of Haskell Relational Record license:             BSD3@@ -41,12 +41,12 @@                      , HDBC                      , HDBC-session                      , HDBC-sqlite3-                     , persistable-record >= 0.5-                     , relational-query >= 0.9-                     , relational-query-HDBC >= 0.6.1+                     , persistable-record >= 0.6+                     , relational-query >= 0.10+                     , relational-query-HDBC >= 0.6.5                      , template-haskell                      -- not link directly but query type map-                     , relational-schemas >= 0.1.3+                     , relational-schemas >= 0.1.5   if impl(ghc == 7.4.*)     build-depends:        ghc-prim == 0.2.* @@ -72,7 +72,8 @@                        ProductType                        Transaction   build-depends:       base < 5-                     , relational-query >= 0.7+                     , product-isomorphic >= 0.0.3+                     , relational-query >= 0.10                      , relational-record-examples                      , template-haskell                      , time
src/Transaction.hs view
@@ -2,7 +2,7 @@  module Transaction where -import Database.Relational.Query (Relation)+import Database.Relational (Relation) import Database.Record.TH.SQLite3 (defineTable)  $(defineTable "examples.db" "transaction0")
src/examples.hs view
@@ -11,6 +11,7 @@ import Prelude hiding (product) import Data.Int (Int64) import Data.Time (Day, LocalTime)+import Data.Functor.ProductIsomorphic ((|$|), (|*|))  import qualified Account import Account (Account, account)@@ -176,7 +177,7 @@      `or'` e ! Employee.startDate' .<. unsafeSQLiteDayValue "2003-01-01"   return e -unsafeSQLiteDayValue :: SqlProjectable p => String -> p Day+unsafeSQLiteDayValue :: SqlContext c => String -> Record c Day unsafeSQLiteDayValue = unsafeProjectSqlTerms . showConstantTermsSQL  -- |@@ -809,8 +810,8 @@   , c1City :: Maybe String   } deriving (Show, Generic) -customer1 :: (SqlProjectable (Projection c), ProjectableShowSql (Projection c))-          => Projection c Customer -> Projection c Customer1+customer1 :: SqlContext c+          => Record c Customer -> Record c Customer1 customer1 c = Customer1 |$| c ! Customer.custId'                         |*| c ! Customer.custTypeCd'                         |*| c ! Customer.city'@@ -1162,7 +1163,7 @@   wheres $ exists $ tl   return unitPlaceHolder -toDay :: (SqlProjectable p, ProjectableShowSql p) => p (Maybe LocalTime) -> p (Maybe Day)+toDay :: SqlContext c => Record c (Maybe LocalTime) -> Record c (Maybe Day) toDay dt = unsafeProjectSql $ "date(" ++ unsafeShowSql dt ++ ")"  -- |