Creates and returns a scredis.TransactionalClient used to perform a transaction.
Creates and returns a scredis.TransactionalClient used to perform a transaction. Calling exec()
on scredis.TransactionalClient triggers the
execution of all queued commands as part of a Redis transaction.
2.0.0
if a previous transaction is still running, i.e. if exec()
has not been called on
a previous multi()
Creates and returns a scredis.PipelineClient used to send multiple commands at once.
Creates and returns a scredis.PipelineClient used to send multiple commands at once. Calling sync()
on scredis.PipelineClient
triggers the execution of all queued commands.
1.0.0
Pipelines multiple commands and returns the results.
Pipelines multiple commands and returns the results.
function to be executed with the provided scredis.PipelineClient
an indexed sequence containing the results of the issued commands in the same order they were queued
1.0.0
if sync()
is called on the scredis.PipelineClient within body
The sync()
method must not be called within body
as it will automatically be called
immediately after body
returns.
Pipelines multiple commands and returns the result of one command returned by body
.
Pipelines multiple commands and returns the result of one command returned by body
.
function to be executed with the provided scredis.PipelineClient
an indexed sequence containing the results of the issued commands in the same order they were queued
1.0.0
It is safe to call sync()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Pipelines multiple commands and returns the results as a map of key to command result pairs.
Pipelines multiple commands and returns the results as a map of key to command result pairs.
function to be executed with the provided scredis.PipelineClient
map of key to command pairs
1.0.0
It is safe to call sync()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Pipelines multiple commands and returns the results of several commands returned by body
.
Pipelines multiple commands and returns the results of several commands returned by body
.
function to be executed with the provided scredis.PipelineClient
collection containing the results of the issued commands in the same order they were queued
1.0.0
It is safe to call sync()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Performs multiple commands as part of a Redis transaction and returns the results.
Performs multiple commands as part of a Redis transaction and returns the results.
function to be executed with the provided scredis.TransactionalClient
an indexed sequence containing the results of the issued commands in the same order they were queued
2.0.0
if exec()
is called on the scredis.TransactionalClient within body
if the transaction is discarded within body
or if a watched key has been
modified by another client
The exec()
method must not be called within body
as it will automatically be called
immediately after body
returns.
Performs multiple commands as part of a Redis transaction and returns the result of the
command returned by body
.
Performs multiple commands as part of a Redis transaction and returns the result of the
command returned by body
.
function to be executed with the provided scredis.TransactionalClient
an indexed sequence containing the results of the issued commands in the same order they were queued
2.0.0
if a watched key has been modified by another client
It is safe to call exec()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Performs multiple commands as part of a Redis transaction and returns the results as a map of key to command result pairs.
Performs multiple commands as part of a Redis transaction and returns the results as a map of key to command result pairs.
function to be executed with the provided scredis.TransactionalClient
map of key to command pairs
1.0.0
if a watched key has been modified by another client
It is safe to call exec()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Performs multiple commands as part of a Redis transaction and returns the results of several
commands returned by body
.
Performs multiple commands as part of a Redis transaction and returns the results of several
commands returned by body
.
function to be executed with the provided scredis.TransactionalClient
an indexed sequence containing the results of the issued commands in the same order they were queued
2.0.0
if a watched key has been modified by another client
It is safe to call exec()
within body
as the library will detect whether it has
already been called and won't call it a second time.
Forgets about all watched keys.
Forgets about all watched keys.
2.0.0
Watches the given keys, which upon modification, will abort a transaction.
Watches the given keys, which upon modification, will abort a transaction.
key to watch
additional keys to watch
2.0.0
This trait implements transactional commands and pipelining.