Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Support for column calculations? #35

Open
fleetio opened this issue Jun 28, 2011 · 0 comments
Open

Support for column calculations? #35

fleetio opened this issue Jun 28, 2011 · 0 comments

Comments

@fleetio
Copy link

fleetio commented Jun 28, 2011

Not sure if I'm missing something or just can't figure it out, but I'm trying to create a where clause in MetaWhere that finds what I call "odometer entries" whose distance is within 250 of a "reminder." Here's what I tried to do, but it doesn't work:

.where(
        {
          :next_occurrence_at.gte => Time.current.beginning_of_day, :next_occurrence_at.lte => 2.weeks.from_now.end_of_day
        } |
        {
          :odometer_entries => {
            :distance.gte => (:next_occurrence_distance - 250)
          }
        }
      )

Does MetaWhere support something like this? I can't find anything similar in the examples or unit tests..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants