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

Support for date-range queries #112

Open
ajsharp opened this issue Jul 25, 2013 · 1 comment
Open

Support for date-range queries #112

ajsharp opened this issue Jul 25, 2013 · 1 comment

Comments

@ajsharp
Copy link
Contributor

ajsharp commented Jul 25, 2013

You can do this manually already, it'd be great if the client made it a little easier:

Balanced::Transaction.paginate("created_at[>=]" => "#{1.day.ago.iso8601}")
@ajsharp
Copy link
Contributor Author

ajsharp commented Jul 25, 2013

Possible interfaces:

t1 = Time.new(2013, 7, 25) 
t2 = Time.new(2013, 7, 24)

Balanced::Transaction.paginate(:before => t1, :after => t2)

Balanced::Transaction.paginate.before(t1).after(t2)

Balanced::Transaction.paginate.between(t1, t2)

Obviously, the last two options would require some type of scoping support in general.

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