Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Filter missing #5

Open
hakunin opened this issue Mar 26, 2011 · 0 comments
Open

Query Filter missing #5

hakunin opened this issue Mar 26, 2011 · 0 comments

Comments

@hakunin
Copy link

hakunin commented Mar 26, 2011

I still have to write:

q = ClickRecord.all.webapp_id(metric.webapp_id)
q._query.addFilter(:created_at,
        Query.FilterOperator.GREATER_THAN,
        Long.new(metric.last_processed_event_time)
      )
q.run.each { |click|
  metric.visit(click)
}

It would be nice to have greater_than method instead, ideally with overloaded version for primitives:

ClickRecord.all.
    webapp_id(metric.webapp_id)
    greater_than(:created_at, metric.last_processed_event_time).
    run.each { |click|
  metric.visit(click)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant