From: ara howard Date: 2008-02-13T07:02:04+09:00 Subject: Re: Comparing Active Record VS Datamapper...? On Feb 12, 2008, at 10:13 AM, S. Potter wrote: > Actually for Ruby programmers as opposed to people that only know APIs > in Ruby, extending the APIs for specific use-cases is very > painless. To > get people started to solve this though (as I do not have permission > to > post the whole code in public yet) you would override the relevant > connection adapters (e.g. > ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, etc.) and > redefine > the #column method to accept (in our case) :default_sql, which > wouldn't > escape the SQL string passed to it. It is good practice to override > all > standard connection adapters even if you do not use them, because you > never know who might start using SQLite3 on the team in development or > test environments. Especially if you roll these AR extensions out > on an > IT-wide or cross-project basis. yes of course, i've done it several times, here's the whole code: http://drawohara.com/post/6677354 this is *way* beyond the abilities of most programmers, however, ruby or not, and is a definite limitation of AR, which binds the hands of people who know sql at even a moderate level. regards a @ http://drawohara.com/ -- sleep is the best meditation. h.h. the 14th dalai lama