I'm getting very, very tired of writing code that looks like this:

db.select_all(long_sql_statement) do |row|
        foo = Foo.new
        foo.a = row['a']
        foo.b = row['b'].to_i
        foo.c = row['c'].to_f
        #...
        foo.z = row['z']
end

It gets even worse when you get relations etc to worry about.

I've heard of at least two mentions of people writing object-relational
mappers, and I'm sure plenty of you lot have written db heavy apps.

Suggestions? :)

-- 
Thomas 'Freaky' Hurst  -  freaky / aagh.net  -  http://www.aagh.net/
-
Familiarity breeds attempt.