Class: DataMapper::Adapters::AbstractAdapter::Queries::Reader

Inherits:
Queries::Reader
  • Object
show all
Defined in:
lib/data_mapper/adapters/abstract_adapter.rb

Overview

Reader is the other Connection related class that will be almost completely custom. The idea with the Reader is to avoid creating a large Array of Hash objects to represent rows since the hashes will be discarded almost immediately. Create only what you need. So the reader creates a single Hash to associate columns with their ordinals in the result set, then indexing the Reader for each row results in looking up the column index, then the value for that index in the current row array.

Instance Attribute Summary

Attributes inherited from Queries::Reader

#columns

Method Summary

Methods inherited from Queries::Reader

#[], #close, #each, #each_pair, #entries, #eof?, #initialize, #records_affected

Constructor Details

This class inherits a constructor from DataMapper::Queries::Reader