lib/lmdb/database.rb
# Iterate through the records in a database
# @yield [i] Gives a record [key, value] to the block
# @yieldparam [Array] i The key, value pair for each record
# @example
#    db.each do |record|
#      key, value = record
#      puts "at #{key}: #{value}"
#    end
Iterate through the records in a database
Iterate through the records in a database
def each
      env.transaction true do
        cursor do |c|
          while i = c.next
            yield(i)
          end
        end
      end
    end
def each env . transaction true do cursor do | c | while i = c . next yield ( i ) end end end end
Iterate through the records in a database
Iterate through the records in a database
]
<not_specific>
Gives a record [key, value] to the block
Gives a record [ key value ] to the block
<not_specific>
i The key, value pair for each record
i The key value pair for each record
example
db.each do |record| key, value = record puts "at #{key}: #{value}" end
db . each do |record| key value = record puts " at # { key } : # { value } " end