Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: da60ab2d96
...
compare: cf7bdc9296
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
2  cassy.cabal
@@ -1,5 +1,5 @@
Name: cassy
-Version: 0.4.1.0
+Version: 0.4.1.1
Synopsis: A high level driver for the Cassandra datastore
License: BSD3
License-file: LICENSE
View
5 src/Database/Cassandra/Basic.hs
@@ -89,7 +89,8 @@ import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe (mapMaybe)
import qualified Database.Cassandra.Thrift.Cassandra_Client as C
-import Database.Cassandra.Thrift.Cassandra_Types (ConsistencyLevel(..))
+import Database.Cassandra.Thrift.Cassandra_Types
+ (ConsistencyLevel (..))
import qualified Database.Cassandra.Thrift.Cassandra_Types as T
import Prelude hiding (catch)
-------------------------------------------------------------------------------
@@ -302,7 +303,7 @@ delete cf k s cl = withCassandraPool $ \ Cassandra {..} -> do
C.remove (cProto, cProto) k (cpCol c) now cl
SupNames sn cs -> forM_ cs $ \c -> do
C.remove (cProto, cProto) k (cpSCol sn c) now cl
- Range _ _ _ _ -> error "delete: Range delete not implemented"
+ Range{} -> error "delete: Range delete not implemented"
where
-- wipe out the entire row
cpAll = T.ColumnPath (Just cf) Nothing Nothing
View
1  src/Database/Cassandra/JSON.hs
@@ -356,6 +356,7 @@ marshallJSON = B.concat . LB.toChunks . A.encode
unMarshallJSON' :: FromJSON a => ByteString -> Maybe a
unMarshallJSON' = unMarshallJSON . B.concat . LB.toChunks
+
------------------------------------------------------------------------------
-- | Decode JSON
unMarshallJSON :: FromJSON a => B.ByteString -> Maybe a
View
8 src/Database/Cassandra/Pack.hs
@@ -161,6 +161,7 @@ instance (CasType a) => CasType (Single a) where
decodeCas bs = flip runGet bs $ Single <$> getSegment
+
-------------------------------------------------------------------------------
-- | Composite types - see Cassandra or pycassa docs to understand
instance (CasType a, CasType b) => CasType (a,b) where
@@ -199,6 +200,13 @@ instance (CasType a, CasType b, CasType c, CasType d) => CasType (a,b,c,d) where
<*> getSegment
+instance CasType a => CasType (Exclusive (Single a)) where
+ encodeCas (Exclusive a) = runPut $ do
+ putSegment a exc
+
+ decodeCas = Exclusive . decodeCas
+
+
instance (CasType a, CasType b) => CasType (a, Exclusive b) where
encodeCas (a, Exclusive b) = runPut $ do
putSegment a sep
View
6 src/Database/Cassandra/Pool.hs
@@ -187,11 +187,11 @@ next Ring{..}
------------------------------------------------------------------------------
removeServer :: Ord a => a -> Ring a -> Ring a
removeServer s r@Ring{..}
- | s `S.member` allItems = Ring (S.delete s allItems) current' used' upcoming'
+ | s `S.member` allItems = Ring all' cur' [] up'
| otherwise = r
where
- used' = filter (/=s) used
- (current':upcoming') = filter (/=s) (current:upcoming)
+ all' = S.delete s allItems
+ cur' : up' = S.toList all'
------------------------------------------------------------------------------

No commit comments for this range

Something went wrong with that request. Please try again.