Skip to content

Added date support to OfflineQuery class #1344

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 8 commits into from
Apr 13, 2021

Conversation

zanderisrael
Copy link
Contributor

Hopefully this fixes the issues iv had with package-lock.json file.

Added date support to OfflineQuery class

this enables you to use $relativeTime in local data store mode the same way you can use it via normal parseQuery.

    const date = new Date('1995-12-17T03:24:00');
    const obj = new ParseObject('Item');
    obj.set('field', date);
    const q = new ParseQuery('Item');
    q.lessThanOrEqualTo('field', { $relativeTime: 'in 0 day' });

@zanderisrael
Copy link
Contributor Author

I'm sorry but im not sure what im doing wrong...

@zanderisrael
Copy link
Contributor Author

npm version issue maybe? used 7 downgrading to 6 now, maybe that will help...

@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #1344 (f832e87) into master (4a75d97) will decrease coverage by 0.70%.
The diff coverage is 41.66%.

❗ Current head f832e87 differs from pull request most recent head a3be420. Consider uploading reports for the commit a3be420 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1344      +/-   ##
==========================================
- Coverage   99.94%   99.23%   -0.71%     
==========================================
  Files          60       60              
  Lines        5847     5919      +72     
  Branches     1311     1346      +35     
==========================================
+ Hits         5844     5874      +30     
- Misses          3       44      +41     
- Partials        0        1       +1     
Impacted Files Coverage Δ
src/OfflineQuery.js 86.40% <41.66%> (-13.60%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a75d97...a3be420. Read the comment docs.

@mtrezza
Copy link
Member

mtrezza commented Apr 13, 2021

@dplewis Maybe we want the NPM version CI check in the JS SDK as well?

@zanderisrael
Copy link
Contributor Author

@dplewis Maybe we want the NPM version CI check in the JS SDK as well?

sure, actually don't know how to do that tho...

@mtrezza
Copy link
Member

mtrezza commented Apr 13, 2021

No worries, we'll add it in another PR so that others can identify the issue easier when they are building with npm 7.

I hand this PR back to @dplewis for review, haven't looked into the details so far, but all tests pass now.

@mtrezza mtrezza requested a review from dplewis April 13, 2021 21:06
Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dplewis dplewis merged commit 490c8c1 into parse-community:master Apr 13, 2021
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

Successfully merging this pull request may close these issues.

3 participants