Method: Redis::Commands::Streams#xdel

Defined in:
lib/redis/commands/streams.rb

#xdel(key, *ids) ⇒ Integer

Delete entries by entry ids.

Examples:

With splatted entry ids

redis.xdel('mystream', '0-1', '0-2')

With arrayed entry ids

redis.xdel('mystream', ['0-1', '0-2'])

Parameters:

  • key (String)

    the stream key

  • ids (Array<String>)

    one or multiple entry ids

Returns:

  • (Integer)

    the number of entries actually deleted



113
114
115
116
# File 'lib/redis/commands/streams.rb', line 113

def xdel(key, *ids)
  args = [:xdel, key].concat(ids.flatten)
  send_command(args)
end