That's impossible without attempting to parse the SQL string, and Sequel
On Tuesday, July 24, 2012 11:05:08 AM UTC-7, Marcos Alcantara wrote:
> Is there any known way to insert a where clause in a raw sql, like this:
> Sequel.sqlite['SELECT * FROM studies'].where(:created_at => @date_range)
never parses SQL, by design.
That said, assuming you don't mind using a subselect:
Sequel.sqlite['SELECT * FROM studies'].from_self.where(:created_at =>
you should get a query that operates similarly.