On Tuesday, July 24, 2012 11:05:08 AM UTC-7, Marcos Alcantara wrote: > > Hi, > > 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) >
That's impossible without attempting to parse the SQL string, and Sequel 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 => @date_range) you should get a query that operates similarly. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/NjK2scwRlXkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
