Watch the given keys to determine execution of the MULTI/EXEC block (http://redis.io/commands/watch).
Modulehedis-0.16.4Haskell2010
Database.Redis.Transactions
- 3 types
- 3 values
- Packagehedis-0.16.4
- Exports6
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceTransactions.hs
Forget about all watched keys (http://redis.io/commands/unwatch).
Run commands inside a transaction. For documentation on the semantics of Redis transaction see http://redis.io/topics/transactions.
Inside the transaction block, command functions return their result wrapped
in a Queued. The Queued result is a proxy object for the actual
command's result, which will only be available after EXECing the
transaction.
Example usage (note how Queued 's Applicative instance is used to combine the two individual results):
runRedis conn $ do
set "hello" "hello"
set "world" "world"
helloworld <- multiExec $ do
hello <- get "hello"
world <- get "world"
return $ (,) <$> hello <*> world
liftIO (print helloworld)
Instances4Monad, Functor, Applicative, RedisCtx
Result of a multiExec transaction.
Instances5Eq, Show, Generic, NFData, Rep
Eq a => Eq (TxResult a)Defined in hedis-0.16.4 · Database.Redis.TransactionsShow a => Show (TxResult a)Defined in hedis-0.16.4 · Database.Redis.TransactionsGeneric (TxResult a)Defined in hedis-0.16.4 · Database.Redis.TransactionsNFData a => NFData (TxResult a)Defined in hedis-0.16.4 · Database.Redis.Transactionstype Rep (TxResult a) = D1 ('MetaDataDefined in hedis-0.16.4 · Database.Redis.Transactions"TxResult"
"Database.Redis.Transactions"
"hedis-0.16.4-J6qBUASraxBLB8aRDTwht"
'False) (C1 ('MetaCons"TxSuccess"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons"TxAborted"
'PrefixI 'False) U1 :+: C1 ('MetaCons"TxError"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))
Instances6Monad, Functor, Applicative, MonadIO, MonadRedis, RedisCtx
Monad RedisTxDefined in hedis-0.16.4 · Database.Redis.TransactionsFunctor RedisTxDefined in hedis-0.16.4 · Database.Redis.TransactionsApplicative RedisTxDefined in hedis-0.16.4 · Database.Redis.TransactionsMonadIO RedisTxDefined in hedis-0.16.4 · Database.Redis.TransactionsMonadRedis RedisTxDefined in hedis-0.16.4 · Database.Redis.TransactionsRedisCtx RedisTx QueuedDefined in hedis-0.16.4 · Database.Redis.Transactions