Trait TransactionCommands

Source
pub trait TransactionCommands {
    // Provided methods
    fn watch<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, ()>
       where Self: Sized,
             K: Into<CommandArg>,
             KK: SingleArgOrCollection<K> { ... }
    fn unwatch(&mut self) -> PreparedCommand<'_, Self, ()>
       where Self: Sized { ... }
}
Expand description

A group of Redis commands related to Transactions

§See Also

Redis Generic Commands

Provided Methods§

Source

fn watch<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, ()>
where Self: Sized, K: Into<CommandArg>, KK: SingleArgOrCollection<K>,

Marks the given keys to be watched for conditional execution of a transaction.

§See Also

https://redis.io/commands/watch/

Source

fn unwatch(&mut self) -> PreparedCommand<'_, Self, ()>
where Self: Sized,

Flushes all the previously watched keys for a transaction.

If you call execute, there’s no need to manually call UNWATCH.

§See Also

https://redis.io/commands/unwatch/

Implementors§