Method: Redis#bitop

Defined in:
lib/redis.rb

#bitop(operation, destkey, *keys) ⇒ Fixnum

Perform a bitwise operation between strings and store the resulting string in a key.

Parameters:

  • operation (String)

    e.g. and, or, xor, not

  • destkey (String)

    destination key

  • keys (String, Array<String>)

    one or more source keys to perform operation

Returns:

  • (Fixnum)

    the length of the string stored in destkey



903
904
905
906
907
# File 'lib/redis.rb', line 903

def bitop(operation, destkey, *keys)
  synchronize do |client|
    client.call([:bitop, operation, destkey] + keys)
  end
end