Skip to content

Relative time queries #4289

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

Merged
merged 28 commits into from
Oct 26, 2017
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5d9b227
Add relative time queries
Sep 26, 2017
9b88e13
Encode successful result
Oct 2, 2017
205fc35
Add integration test
Oct 11, 2017
712c495
Add more error cases
Oct 11, 2017
f3fce46
Remove unnecessary new Date
Oct 11, 2017
b837e2a
Error when time has both 'in' and 'ago'
Oct 12, 2017
f4723a6
naturalTimeToDate -> relativeTimeToDate
Oct 13, 2017
477bbab
Add $relativeTime operator
Oct 24, 2017
f28f3fd
Throw error if $relativeTime is invalid
Oct 24, 2017
ced46cb
Add integration test for invalid relative time
Oct 24, 2017
b1e2594
Exclude $exists query
Oct 24, 2017
db94a73
Only run integration tests on MongoDB
Oct 24, 2017
5e503d1
Add it_only_db test helper
Oct 24, 2017
6a09f17
Handle where val might be null or undefined
Oct 24, 2017
f8ce556
Add integration test for multiple results
Oct 25, 2017
68641c4
Lowercase text before processing
Oct 25, 2017
f82fff2
Always past if not future
Oct 25, 2017
6a0e2ce
Precompute seconds multiplication
Oct 25, 2017
50dc4ba
Add shorthand for interval
Oct 25, 2017
5f7d26b
Throw error if $relativeTime is used with $exists, $ne, and $eq
Oct 25, 2017
af0f831
Improve coverage for relativeTimeToDate
Oct 25, 2017
dc61f91
Add test for erroring on floating point units
Oct 25, 2017
1995052
Remove unnecessary dropDatabase function
Oct 25, 2017
91149e9
Unit test $ne, $exists, $eq
Oct 25, 2017
a46dadd
Verify field type
Oct 25, 2017
6aa7442
Fix unit test for $exists
Oct 25, 2017
08d0743
Merge branch 'master' into relative-time-queries
marvelm Oct 25, 2017
314bac5
Merge branch 'master' into relative-time-queries
montymxb Oct 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary new Date
  • Loading branch information
Marvel Mathew committed Oct 25, 2017
commit f3fce460db42b97cd1cd6bd1c4e3737359b9fee3
2 changes: 1 addition & 1 deletion src/Adapters/Storage/Mongo/MongoTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ function transformConstraint(constraint, field) {
if (typeof text === 'string') {
const parserResult = naturalTimeToDate(text);
if (parserResult.status === 'success') {
answer[key] = new Date(parserResult.result);
answer[key] = parserResult.result;
break;
}
}
Expand Down