packages feed

persistent 0.6.2 → 0.6.3

raw patch · 3 files changed

+22/−37 lines, 3 filesdep +data-objectdep −HDBCdep −HDBC-postgresqldep −HUnitdep ~bytestringdep ~containersdep ~enumerator

Dependencies added: data-object

Dependencies removed: HDBC, HDBC-postgresql, HUnit, QuickCheck, bson, cereal, compact-string-fix, file-location, hspec, mongoDB, network, persistent, random, template-haskell

Dependency ranges changed: bytestring, containers, enumerator, monad-control, path-pieces, text, time, transformers

Files

Database/Persist.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE TypeFamilies #-} module Database.Persist     ( PersistField (..)     , PersistEntity (..)
Database/Persist/Base.hs view
@@ -46,6 +46,9 @@     , UniqueDef (..)     , fst3, snd3, third3     , limitOffsetOrder++      -- * Config+    , PersistConfig (..)     ) where  import Data.Time (Day, TimeOfDay, UTCTime)@@ -76,6 +79,9 @@ import qualified Data.Text.Read import Data.Maybe (fromMaybe, isJust) +import Control.Monad.IO.Control (MonadControlIO)+import Data.Object (TextObject)+ fst3 :: forall t t1 t2. (t, t1, t2) -> t fst3   (x, _, _) = x snd3 :: forall t t1 t2. (t, t1, t2) -> t1@@ -568,3 +574,16 @@     toPersistValue = id     fromPersistValue = Right     sqlType _ = SqlInteger -- since PersistValue should only be used like this for keys, which in SQL are Int64++-- | Represents a value containing all the configuration options for a specific+-- backend. This abstraction makes it easier to write code that can easily swap+-- backends.+class PersistConfig c where+    type PersistConfigBackend c :: (* -> *) -> * -> *+    type PersistConfigPool c+    loadConfig :: TextObject -> Either String c+    -- | I really don't want Applicative here, but it's necessary for Mongo.+    withPool :: (Applicative m, MonadControlIO m) => c -> (PersistConfigPool c -> m a) -> m a+    runPool :: MonadControlIO m => c -> PersistConfigBackend c m a+            -> PersistConfigPool c+            -> m a
persistent.cabal view
@@ -1,5 +1,5 @@ name:            persistent-version:         0.6.2+version:         0.6.3 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -25,6 +25,7 @@                    , blaze-html               >= 0.4     && < 0.5                    , path-pieces              >= 0.0     && < 0.1                    , mtl                      >= 2.0     && < 2.1+                   , data-object              >= 0.3.1.7 && < 0.4     exposed-modules: Database.Persist                      Database.Persist.Base                      Database.Persist.Quasi@@ -36,42 +37,6 @@                      Database.Persist.Join                      Database.Persist.Join.Sql     ghc-options:     -Wall--test-suite test-    type:          exitcode-stdio-1.0-    main-is:       main.hs-    hs-source-dirs: test, persistent-template, persistent-sqlite, persistent-postgresql, persistent-mongoDB--    build-depends:   HUnit-                   , hspec >= 0.6.1 && < 0.7-                   , file-location >= 0.4 && < 0.5-                   , base >= 4 && < 5-                   , template-haskell >= 2.4 && < 2.7-                   , HDBC-postgresql-                   , HDBC-                   -- mongoDB dependencies-                   , mongoDB       == 1.1.*-                   , bson          >= 0.1.5-                   , cereal-                   , network-                   , compact-string-fix-                   , persistent-                   , path-pieces-                   , text-                   , transformers-                   , monad-control-                   , containers-                   , bytestring-                   , enumerator-                   , time >= 1.2-                   , random == 1.*-                   , QuickCheck == 2.4.*--    -- these are mutually exclusive options-    -- cpp-options: -DWITH_POSTGRESQL-    -- cpp-options: -DWITH_MONGODB -DDEBUG-    ghc-options:   -Wall-    extra-libraries: sqlite3  source-repository head   type:     git