packages feed

rocksdb-query 0.4.1 → 0.4.2

raw patch · 3 files changed

+15/−9 lines, 3 files

Files

CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.4.2+### Adedd+- Forgot to add retrieval using column families.+ ## 0.4.1 ### Added - Support column families.
rocksdb-query.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: b80763c5cc5ac5d920a8520a11db9cf0eb4634498bd96fe94c7bca37ca199021+-- hash: 9168d4dea9cbb5ba9ee1c2415d77c5a8af439e486bb3997401404c2a11b3c475  name:           rocksdb-query-version:        0.4.1+version:        0.4.2 synopsis:       RocksDB database querying library for Haskell description:    Please see the README on GitHub at <https://github.com/jprupp/rocksdb-query#readme> category:       Database
src/Database/RocksDB/Query.hs view
@@ -31,13 +31,15 @@     => DB     -> key     -> m (Maybe value)-retrieve db key =-    R.get db (encode key) >>= \case-        Nothing -> return Nothing-        Just bytes ->-            case decode bytes of-                Left e  -> throwString e-                Right x -> return (Just x)+retrieve db = retrieveCommon db Nothing++retrieveCF ::+       (MonadIO m, KeyValue key value, Serialize key, Serialize value)+    => DB+    -> ColumnFamily+    -> key+    -> m (Maybe value)+retrieveCF db cf = retrieveCommon db (Just cf)  -- | Read a value from the database, or 'Nothing' if not found. retrieveCommon ::