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

Add distinct / unique filter #920

Merged
merged 9 commits into from
May 9, 2019
Merged

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Oct 26, 2018

Closes: #888

I don't really know the conventions for react, so any help would be appreciated.

screen shot 2018-10-26 at 2 25 03 pm

More testing will be needed as I may have missed something.

@dplewis
Copy link
Member Author

dplewis commented Oct 26, 2018

@flovilmart @acinader Quick update

Add / Delete rows are disabled if filtering by unique.

All fields are readonly

It works for all fields except arrays. Discussed here parse-community/parse-server#4195 (comment)

I could also add not unique filter, discussed here parse-community/parse-server#5019

This haven't been tested on Postgres

@flovilmart
Copy link
Contributor

Can you quickly test over on Postgres? Worst case add a flag on parse server features

@dplewis
Copy link
Member Author

dplewis commented Oct 27, 2018

@flovilmart A quick fix for PG and everything works

@flovilmart
Copy link
Contributor

@natanrolnik what do you think? Not well versed in this area ;)

@natanrolnik
Copy link
Contributor

@flovilmart sorry the late reply.
Although react is also not my strongest skill, the changes look fine to me.
@dplewis would you mind adding a few more screenshot?

@dplewis
Copy link
Member Author

dplewis commented Nov 1, 2018

@natanrolnik What would you like to see?

@dplewis
Copy link
Member Author

dplewis commented Nov 1, 2018

Tested on Safari and Chrome

screen shot 2018-11-01 at 10 22 41 am

Date

screen shot 2018-11-01 at 10 19 22 am

Object

screen shot 2018-11-01 at 10 19 07 am

Pointer

screen shot 2018-11-01 at 10 18 42 am

screen shot 2018-11-01 at 10 18 49 am

@natanrolnik
Copy link
Contributor

Looks good. My only comment:

From what I see here, the “Add a column” button is still enabled. Do you think it makes sense to disable it? I think it does.

@dplewis
Copy link
Member Author

dplewis commented Nov 1, 2018

Yeah, I wanted your advice on that. I can remove it

@dplewis
Copy link
Member Author

dplewis commented Nov 1, 2018

Distinct queries doesn't have sorting FYI

screen shot 2018-11-01 at 1 46 04 pm

@dplewis
Copy link
Member Author

dplewis commented Nov 1, 2018

@natanrolnik @flovilmart I just tried this against a Collection with 305k unique records (_Session, expiresAt field) and received a 504 (Gateway Timeout).

@dplewis dplewis requested a review from natanrolnik December 4, 2018 02:03
@stale
Copy link

stale bot commented Jan 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state:wont-fix Won’t be fixed with a clearly stated reason label Jan 18, 2019
@stale stale bot closed this Jan 25, 2019
@dplewis dplewis reopened this Jan 25, 2019
@stale stale bot removed the state:wont-fix Won’t be fixed with a clearly stated reason label Jan 25, 2019
@acinader
Copy link
Contributor

acinader commented Apr 2, 2019

@dplewis what do you want to wit this?

@dplewis
Copy link
Member Author

dplewis commented Apr 2, 2019

@acinader Waiting for review. I did find that on large datasets this can cause a timeout, if you haven't set timeout / index the field.

@acinader
Copy link
Contributor

acinader commented Apr 2, 2019

what do you think about that?

@dplewis
Copy link
Member Author

dplewis commented Apr 2, 2019

A popup box with a warning or wait until indexes get added to dashboard

@acinader
Copy link
Contributor

acinader commented Apr 2, 2019

can you catch the timeout?

@dplewis
Copy link
Member Author

dplewis commented May 3, 2019

After updating my server config maxTimeMS I don't get that timeout error.

@dplewis dplewis changed the title [WIP] Add distinct / unique filter Add distinct / unique filter May 9, 2019
@dplewis dplewis merged commit c4e238f into parse-community:master May 9, 2019
@dplewis dplewis deleted the unique-filter branch May 9, 2019 21:50
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
@parse-github-assistant
Copy link

The label type:feature cannot be used here.

@parse-github-assistant parse-github-assistant bot removed the type:feature New feature or improvement of existing feature label Dec 6, 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.

Add distinct / unique filter
5 participants