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

Support for column calculations? #35

Description

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions