Sha256: 5aff9f2dd0c770303dcccb66f50e50847ff4a9cecb49b0ad6a56f5ac7d579d7b

Contents?: true

Size: 396 Bytes

Versions: 2

Compression:

Stored size: 396 Bytes

Contents

module Groonga
  class Database
    def each
      context = Context.instance
      flags =
        TableCursorFlags::ASCENDING |
        TableCursorFlags::BY_ID
      cursor = TableCursor.open(self, :flags => flags)
      begin
        cursor.each do |id|
          object = context[id]
          yield(object) if object
        end
      ensure
        cursor.close
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rroonga-4.0.8-x64-mingw32 vendor/local/lib/groonga/scripts/ruby/database.rb
rroonga-4.0.8-x86-mingw32 vendor/local/lib/groonga/scripts/ruby/database.rb