> Is there a non-standard way to do this specific to Sqlite3, MySQL, etc... ?

You can use a view:

http://dev.mysql.com/doc/refman/5.0/en/create-view.html

This is supported with slightly varying syntax by Oracle, MSSQL,
MySQL, and PostgreSQL. I can't remember if AR support for views has
been added to any newer version of Rails yet, but here is a gem I have
used in the past:

http://activewarehouse.rubyforge.org/rails_sql_views/

There are some caveats and gotchas, but as long as your query is read-
only data you should be fine. Another option is to hack the Rails core
MySQL (or database-specific) adapter and trick AR into seeing views as
tables (though I wouldn't suggest this for any production code).

HTH!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to