def fetch_all
names = {}
@entity.attributes.each do |attr|
names[attr.column_name.to_i] = attr.name
end
rows = []
@result.each do |raw_row|
row = {}
raw_row.each_with_index do |value, index|
column = names[index]
attr = nil
@attributes_to_fetch.each do |_attr|
if _attr.name == column then
attr = _attr
end
end
if attr then
encoding = @adapter_context.adapter.connection['encoding']
value = _convert_value(attr, value)
row[attr.name] = attr.new_value(value, encoding)
else
row[column] = value
end
end
rows << row
end
rows
end