Skip to content

Added some data retrieval methods to fetch data easily. #865

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

Closed
wants to merge 1 commit into from
Closed

Added some data retrieval methods to fetch data easily. #865

wants to merge 1 commit into from

Conversation

Aniketkhote
Copy link

What kind of change does this PR introduce?

feature

What is the current behavior?

To fetch single latest or oldest data currently need to apply order() on created_at field and then single() method to get one also to fetch null, true or false we need to pass in isFilter.

What is the new behavior?

latest() and oldest()

Before

final data = await supabase.from('users').select().order('created_at, ascending: true).single();

Now

final data = await supabase.from('users').select().latest();
or
final data = await supabase.from('users').select().latest('id');

same for oldest.

isNull() , isTrue() and isFalse()

Before

final data = await supabase.from('users').select().isFilter('data', null);

Now

final data = await supabase.from('users').select().isNull('data');
or
final data = await supabase.from('users').select().isTrue('data');
or
final data = await supabase.from('users').select().isFalse('data');

@dshukertjr
Copy link
Member

Thanks for the suggestion, but unfortunately we are not adding these new methods.

@dshukertjr dshukertjr closed this Mar 21, 2024
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