the AR adapter's #select_rows method should be returning an array of arrays (thanks to r-stu31 for the patch)
This commit is contained in:
parent
a265d36571
commit
39b4776a67
@ -256,12 +256,11 @@ module ActiveRecord
|
|||||||
# DATABASE STATEMENTS ======================================
|
# DATABASE STATEMENTS ======================================
|
||||||
|
|
||||||
def select_values(sql, name = nil)
|
def select_values(sql, name = nil)
|
||||||
result = select_rows(sql, name)
|
select(sql, name).map { |row| row.values.first }
|
||||||
result.map { |row| row.values.first }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_rows(sql, name = nil)
|
def select_rows(sql, name = nil)
|
||||||
select(sql, name)
|
select(sql, name).map { |row| row.values }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Executes a SQL query and returns a MySQL::Result object. Note that you have to free the Result object after you're done using it.
|
# Executes a SQL query and returns a MySQL::Result object. Note that you have to free the Result object after you're done using it.
|
||||||
|
Loading…
Reference in New Issue
Block a user