A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://socketry.github.io/async-redis/source/Async/Redis/Context/Transaction/index.html below:

Async::Redis::Context::Transaction

Context for Redis transaction operations using MULTI/EXEC.

Definitions def initialize(pool, *arguments)

Initialize a new transaction context.

Signature
parameter pool Pool

The connection pool to use.

parameter arguments Array

Additional arguments for the transaction.

Implementation
def initialize(pool, *arguments)
	super(pool)
end
def multi

Begin a transaction block.

Implementation
def multi
	call("MULTI")
end
def watch(*keys)

Watch keys for changes during the transaction.

Signature
parameter keys Array(String)

The keys to watch.

Implementation
def watch(*keys)
	sync.call("WATCH", *keys)
end
def execute

Execute all queued commands, provided that no watched keys have been modified. It's important to note that even when a command fails, all the other commands in the queue are processed – Redis will not stop the processing of commands.

Implementation
def execute
	sync.call("EXEC")
end
def discard

Discard all queued commands in the transaction.

Implementation
def discard
	sync.call("DISCARD")
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4