(5 secs) Here's Sequel's BasicObject class. Note that it has separate versions for ruby 1.8 and ruby 1.9.
http://github.com/jeremyevans/sequel/blob/3.10.0/lib/sequel/sql.rb#L2