lib/lmdb/database.rb
# Iterate over the duplicate values of a given key, using an
# implicit cursor. Works whether +:dupsort+ is set or not.
#
# @param key [#to_s] The key in question.
# @yield value [String] the next value associated with the key.
# @return [Enumerator] in lieu of a block.
Iterate over the duplicate values of a given key, using an
implicit cursor. Works whether +:dupsort+ is set or not.
Iterate over the duplicate values of a given key using an implicit cursor . Works whether + : dupsort + is set or not .
def each_value(key, &block)
      return enum_for :each_value, key unless block_given?
      value = get(key) or return
      unless dupsort?
        yield value
        return
      end
      env.transaction true do
        cursor do |c|
          method = :set
          while rec = c.send(method, key)
            method = :next_range
            yield rec[1]
          end
        end
      end
    end
def each_value ( key , & block ) return enum_for :each_value , key unless block_given? value = get ( key ) or return unless dupsort? yield value return end env . transaction true do cursor do | c | method = :set while rec = c . send ( method , key ) method = :next_range yield rec [ 1 ] end end end end
Iterate over the duplicate values of a given key, using an
implicit cursor.
Iterate over the duplicate values of a given key using an implicit cursor .
in lieu of a block.
in lieu of a block .
Enumerator
key
The key in question.
The key in question .
block
<not_specific>
]
<not_specific>
value  the next value associated with the key.
value the next value associated with the key .