Redis::TransactionApi
Inherits Redis::CommandExecution::FutureOriented / Redis::Commands / Reference / Object
API for sending commands in a transaction.
Used in Redis#multi.
Example:
redis.multi do |multi|
multi.set("foo1", "first")
multi.set("foo2", "second")
end
In this example, the multi object passed to the block is a TransactionApi
object.
Constructors
Instance methods
discard
Aborts the current transaction.
Example:
redis.multi do |multi|
multi.set("foo", "the new value")
multi.discard
end