--0-798165610-12192563091363
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,
I have a question about using ActiveRecord.The way I understand ActiveRecord is that you can use it as a kind of bridge between Ruby and a relational database.I believe that you can use it to create objects fromables and that the objects are equivalent to the rows of data in the tables.
I want to be able to use it a bit differently than that.I want toe able to create abjects that are arrays of the values in specific fieldsn a given table.For example, given the following table:
X  Y  Z
1   'a'   1.1
2   'b'   6.2
3   'c'   0.001
I want to be able to create an array from the X field that is equal to [1, 2, 3], and an array from the Y field that is equal to ['a', 'b', 'c'], and so forth.

Better yet, I'd like to be able to create an array of hashes, where each element of the array is equal to a hash of the fields in the table, like this:
[{:x => 1, :y => 'a', :z => 1.1}, {:x => 2, :y => 'b', :z => 6.2}, {:x => 3, :y => 'c', :z => 0.001}] 
Can anyone tell me if this is doable in ActiveRecord, or in some other Ruby package, or with some stand-alone Ruby code?
Thanks for your help,
Glenn
--0-798165610-12192563091363--