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
ReQL proposal: add an optarg step
to r.range
#3148
Comments
Makes sense. |
It would be really useful if you could also pass it a unit of time, i.e. |
@marshall007 I believe the current implementation of |
@marshall007 I've just opened #3149 which proposes to support dates and floating point numbers. |
@mlucy just suggested naming the optarg |
I would prefer to hold off on this until the next ReQL discussion period, just because it can be a distraction to settle ReQL proposals in the middle of a release cycle, but if people think it's essential to the command then I guess it's OK to do it as part of 1.16. I have no strong opinion on stride vs. step. We should use whatever seems most common. |
I'm used to that parameter being named |
I originally thought of this as a straight-forward ammendment to the |
I have a table that stores documents with an effective date range and I'd like to be able to efficiently query for the active ones on a given date. The table.indexCreate(
'day',
r.range(r.row('date_start').date(), r.row('date_end').date(), { step: 'day' }),
{ multi: true }
)
table.getAll(r.now().date(), { index: 'day' }) I think this is a fairly compelling use-case. I imagine there are plenty of other interesting cases where the |
Interesting use |
Currently
r.range
as proposed in #875 always increments by one, which I propose to be specified through an optarg namedstep
.The text was updated successfully, but these errors were encountered: