If you would rather use SQL than ruby, Sequel makes that easy.
Just pass a string instead of a symbol to the Database array access operator, and call all to get all rows.