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

refactor!(postgrest, supabase): make schema variable private and rename useSchema() to schema() #737

Merged
merged 1 commit into from Nov 29, 2023

Conversation

dshukertjr
Copy link
Member

What kind of change does this PR introduce?

Currently the JS library uses .schema() to change the schema for calling APIs to non-public schema. However, the Dart library uses useSchema(), because schema symbol was already taken by the schema variable in postgrest.dart.

This PR renames the schema variable to _schema and .useSchema() to .schema() to align the public API with the JS library.

What is the current behavior?

await supabase.useSchema('custom_schema').from('table').select();

What is the new behavior?

await supabase.schema('custom_schema').from('table').select();

@dshukertjr dshukertjr merged commit ff8de40 into next Nov 29, 2023
8 checks passed
@dshukertjr dshukertjr deleted the refactor/useSchema branch November 29, 2023 10:09
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.

None yet

2 participants