Skip to content

PG: Add dates to group aggregate #4549

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 5 commits into from
Feb 16, 2018
Merged

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Feb 7, 2018

Closes #4546

Let me know if more tests are needed.

I didn't really know how to write a test case for createdAt / updatedAt.

Also, I don't think it_only_db('mongo') works anymore.

@codecov
Copy link

codecov bot commented Feb 7, 2018

Codecov Report

Merging #4549 into master will increase coverage by 0.02%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4549      +/-   ##
==========================================
+ Coverage   92.88%   92.91%   +0.02%     
==========================================
  Files         118      118              
  Lines        8457     8491      +34     
==========================================
+ Hits         7855     7889      +34     
  Misses        602      602
Impacted Files Coverage Δ
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 95.54% <83.33%> (-0.26%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.21% <96.87%> (+0.07%) ⬆️
src/RestWrite.js 93.46% <0%> (+0.18%) ⬆️

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 10eafe9...0311c64. Read the comment docs.

@dplewis dplewis requested a review from flovilmart February 7, 2018 15:22
@dplewis
Copy link
Member Author

dplewis commented Feb 8, 2018

@flovilmart I just realized that Postgres doesn't store dates as UTC like mongo. Is that proper functionality?

@flovilmart
Copy link
Contributor

ALL dates should be UTC (that’s the expected behavior). If it isn’t, then... that’s quite problematic :/

@dplewis
Copy link
Member Author

dplewis commented Feb 8, 2018

For instance the objects I just created on postgres look like 2018-02-07 20:58:31.512-06. That -06 is Central Time

@flovilmart
Copy link
Contributor

ouch yeah all dates should be UTC, but becaut they have the TZ info, not all is lost :)

@dplewis
Copy link
Member Author

dplewis commented Feb 8, 2018

@flovilmart should we convert them to UTC or leave them be?

@dplewis
Copy link
Member Author

dplewis commented Feb 16, 2018

@flovilmart The PG date storage aside how does this look?

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

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

Looking good!

@dplewis
Copy link
Member Author

dplewis commented Feb 16, 2018

@flovilmart Thanks. What about the node vulnerability?

@dplewis dplewis merged commit 143b0f0 into parse-community:master Feb 16, 2018
@dplewis dplewis deleted the age-group-obj branch February 16, 2018 18:41
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* PG: Add dates to group aggregate

* returns dates as UTC
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.

2 participants