# File lib/dm-core/adapters/data_objects_adapter.rb, line 76 def read(query) fields = query.fields types = fields.map { |property| property.primitive } statement, bind_values = select_statement(query) records = [] with_connection do |connection| command = connection.create_command(statement) command.set_types(types) reader = command.execute_reader(*bind_values) begin while reader.next! records << fields.zip(reader.values).to_hash end ensure reader.close end end records end