For time being it solves my need, since I do not know the universal quote ( ` ) for field (ex: sqlite, postgresql, oracle).
Thanks Jeremy. On Mon, Mar 29, 2010 at 7:51 PM, Jeremy Evans <[email protected]> wrote: > On Mar 29, 12:17 am, Widi Harsojo <[email protected]> wrote: >> Dear all >> >> is it Ok to change filter like this? >> I use oracle and the first filter (remark) failed >> Thx. >> >> def self.next(limit = self.limit) >> #filter( >> # '`failed_at` IS NULL AND `completed_at` IS NULL AND `run_at` <= ?', >> # Time.now >> #).order(:priority.desc, :created_at).first(limit) >> filter( >> (:run_at <= Time.now), >> {:failed_at => nil, >> :completed_at => nil} >> ).order(:priority.desc, :created_at).first(limit) >> end > > It won't work correctly on ruby 1.9. Otherwise, it looks good. > > -- > You received this message because you are subscribed to the Google Groups > "sequel-talk" group. > 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. > > -- /wh e=mc2inhologram -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. 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.
