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

Support Distinct functionality in Flutter SDK #782

Closed
jassirr opened this issue Dec 31, 2023 · 4 comments
Closed

Support Distinct functionality in Flutter SDK #782

jassirr opened this issue Dec 31, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jassirr
Copy link

jassirr commented Dec 31, 2023

Is your feature request related to a problem? Please describe.
Currently, there is no way provided by the SDK to get the distinct records of a particular query.

Describe the solution you'd like

await supabaseClient
  .from(Constants.TABLE_NAME)
  .select('id', distinct: true)
  .eq('user_id', userId);

or

await supabaseClient
  .from(Constants.TABLE_NAME)
  .select('id',)
  .eq('user_d', roomId).distinct;

Additional context
This can reduce a burden of additionally not writing a method of providing the distinct results of queries.

@jassirr jassirr added the enhancement New feature or request label Dec 31, 2023
@jassirr

This comment was marked as spam.

@dshukertjr
Copy link
Member

Hi @jassirr

Thanks for this feature request. Currently, PostgREST, the automatic API generation tool that Supabase use, does not provide a distinct select functionality. You can read some of the reasonings why it's not implemented here.

However, Group By is coming to PostgREST, which you could use to query similar results. You can read more about it here:
https://supabase.com/blog/postgrest-12#aggregate-functions

Note that aggregate functions are not yet supported on Supabase at this point.

I'm going to close this issue as aggregate functions will be available without requiring any updates on the supabase-flutter client library, but if you have further questions/ comments, feel free to leave them!

@dshukertjr dshukertjr closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@anshunjain
Copy link

When will postgrest-12 be available on SUPABASE. My logs seem to suggest that we are on postgrest 11.2 @dshukertjr

@Vinzent03
Copy link
Collaborator

@anshunjain In case you still miss the update, here's the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants