packages feed

selda 0.1.11.0 → 0.1.11.1

raw patch · 4 files changed

+13/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,6 +1,11 @@ # Revision history for Selda  +## 0.1.11.1 -- 2017-10-10++* Fix rare infinite loop bug in in-process cache.++ ## 0.1.11.0 -- 2017-09-08  * Fix name generation in the presence of isIn over queries.
README.md view
@@ -723,7 +723,7 @@  Features that would be nice to have but are not yet implemented. -* If/else.+* Monadic if/else. * Streaming * Type-safe migrations * `SELECT INTO`.
selda.cabal view
@@ -1,5 +1,5 @@ name:                selda-version:             0.1.11.0+version:             0.1.11.1 synopsis:            Type-safe, high-level EDSL for interacting with relational databases. description:         This package provides an EDSL for writing portable, type-safe, high-level                      database code. Its feature set includes querying and modifying databases,
src/Database/Selda/Caching.hs view
@@ -22,6 +22,10 @@  type CacheKey = (Text, Text, [Param]) +-- | Reduce all parts of a cache key to HNF.+seqCK :: CacheKey -> a -> a+seqCK (db, q, ps) x = db `seq` q `seq` ps `seq` x+ #ifdef NO_LOCALCACHE  cache :: Typeable a => [TableName] -> CacheKey -> a -> IO ()@@ -81,7 +85,7 @@  -- | Cache the given value, with the given table dependencies. cache :: Typeable a => [TableName] -> CacheKey -> a -> IO ()-cache tns k v = atomicModifyIORef' theCache $ \c -> (cache' tns k v c, ())+cache tns k v = k `seqCK` atomicModifyIORef' theCache (\c -> (cache' tns k v c, ()))  cache' :: Typeable a => [TableName] -> CacheKey -> a -> ResultCache -> ResultCache cache' tns k v rc@@ -105,7 +109,7 @@  -- | Get the cached value for the given key, if it exists. cached :: forall a. Typeable a => CacheKey -> IO (Maybe a)-cached k = atomicModifyIORef' theCache $ cached' k+cached k = k `seqCK` atomicModifyIORef' theCache (cached' k)  cached' :: forall a. Typeable a => CacheKey -> ResultCache -> (ResultCache, Maybe a) cached' k rc = do