Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/redis/distributed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,21 @@ def hgetall(key)
node_for(key).hgetall(key)
end

# Scan a hash
def hscan(key, cursor, **options)
node_for(key).hscan(key, cursor, **options)
end

# Scan a hash and return an enumerator
def hscan_each(key, **options, &block)
node_for(key).hscan_each(key, **options, &block)
end

# Get the length of the value stored in a hash field
def hstrlen(key, field)
node_for(key).hstrlen(key, field)
end

# Post a message to a channel.
def publish(channel, message)
node_for(channel).publish(channel, message)
Expand Down
8 changes: 0 additions & 8 deletions test/distributed/commands_on_hashes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ class TestDistributedCommandsOnHashes < Minitest::Test
include Helper::Distributed
include Lint::Hashes

def test_hscan
# Not implemented yet
end

def test_hstrlen
# Not implemented yet
end

def test_mapped_hmget_in_a_pipeline_returns_hash
assert_raises(Redis::Distributed::CannotDistribute) do
super
Expand Down