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

Ideas #231

Closed
6 tasks done
ankane opened this issue Feb 19, 2020 · 10 comments
Closed
6 tasks done

Ideas #231

ankane opened this issue Feb 19, 2020 · 10 comments

Comments

@ankane
Copy link
Owner

ankane commented Feb 19, 2020

Groupdate 6

  • Raise error for non-attribute column argument without Arel.sql
  • Return dates in SQL for day, week, month, quarter, and year - date_queries2 branch AND remove dates option
  • Raise error for ranges with string bounds (.."2020-01-01" currently only includes first second of day, unlike ..Date.parse("2020-01-01") - alternatively, we could try to detect dates)
  • Drop support for Active Record < 5.2 and Ruby < 2.6

Ideas

  • Support endless ranges in range option - endless_range2 branch
  • Support beginless ranges in range option
@jeffblake
Copy link

Thanks for the release! For fear of asking too much, do you mind merging master into group_by_duration?

@ankane
Copy link
Owner Author

ankane commented Feb 19, 2020

np, merged

@nhh
Copy link

nhh commented Jul 23, 2020

Is group_by_duration available on master? If so, are there any docs? Thanks!!

@ankane
Copy link
Owner Author

ankane commented Jul 23, 2020

Hey @nhh, see #23 (comment) for the latest update.

@nhh
Copy link

nhh commented Jul 28, 2020

@ankane thank you!

Whats the reason behind dropping "group_by_duration" in favor of steps "n".?

I really liked the group_by_duration method, because it feels "intuitive" and the ruby way. But reasons are probably technical, right?

@ankane
Copy link
Owner Author

ankane commented Jul 28, 2020

@nhh I think it'll be less confusing for users. See #23 (comment).

@gekong
Copy link

gekong commented Mar 26, 2021

I'm building a multi model chart by doing
model1.where('created_at < ?', Time.now).where('created_at > ?', Time.now - 14.days).group_by_day(:created_at).count
model2.where('created_at < ?', Time.now).where('created_at > ?', Time.now - 14.days).group_by_day(:created_at).count
the list created only lists each day that has a record and not the days that don't
is there a way to force this to show the count 0 on days that don't have any records? (this only happens in beginnings and endings)
I hope my explanation makes sense.

@gekong
Copy link

gekong commented Mar 26, 2021

image

@ankane
Copy link
Owner Author

ankane commented Apr 1, 2021

Hey @gekong, if you use the range option instead of where to limit the time range, it'll fill in zeros at the start and end.

@gekong
Copy link

gekong commented Apr 2, 2021

Hey @gekong, if you use the range option instead of where to limit the time range, it'll fill in zeros at the start and end.

Awesome my bad!

@ankane ankane closed this as completed Jan 16, 2022
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

4 participants