[Rails] Re: How to implement more database adapters for Active Record

David Heinemeier Hansson david at loudthinking.com
Wed Dec 1 20:13:01 GMT 2004


> To implement a Query object, I imagine adding new methods that would
> be an alternative to the raw-SQL methods (which could remain). They
> would have parameters and/or a block for query building. Would you
> consider that making the API more complicated?

Yeah, I'm not a fan of abstracting away SQL. Lots of other ORMs go that 
direction (and mostly fail in my opinion). Active Record is for 
relational databases and SQL is the best query language for that.

Whatever tighter integration Rails will get with the likes of Madeleine 
and ActiveLDAP will be through duck typing. Not by trying to abstract 
our way out of it.

So the level of abstraction for SQL should only occur to ensure that 
Active Record will work with more databases. And even better, if we can 
NOT do that by implementing something more clever on types and quoting.
--
David Heinemeier Hansson,
http://www.basecamphq.com/   -- Web-based Project Management
http://www.rubyonrails.org/  -- Web-application framework for Ruby
http://macromates.com/       -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain



More information about the Rails mailing list