supabase
supabase copied to clipboard
Enable optional schema override
It would be nice to make it possible to override the default schema. It's a non-breaking-change.
Types of changes
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
By giving the useSupabaseClient
this optional parameter, the schema-selection is not limited to public
.
This enables very easy schema selection which is useful for more complex databases.
Checklist:
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes (if not applicable, please state why)
The change seems too minor to test.
Deploy Preview for supabase-module canceled.
Name | Link |
---|---|
Latest commit | 6385a224d2d29e860f16267502557c928243ad56 |
Latest deploy log | https://app.netlify.com/sites/supabase-module/deploys/62ea531dce98d3000847d4cc |
@josuemartinezz could you review this? I currently need to bypass this by manually overriding the protected property schema
which my linter and IDE do not like. Having exceptions all over my project is ugly :/.
Hey @AlbertDavid94, thanks for the proposal. However you can override the schema in your nuxt.config.ts
, using the client
option: https://supabase.nuxtjs.org/get-started#options
Does it make the job ?
@larbish the configuration option would still limit the number of schemas. I use multiple schemas in my project.
Ok I understand. However, your code won't work because the client is created only once then share through the nuxtApp. An option could be to recreate the client if options are passed as parameter of the client. We could be able to override all options instead of only the schema
one.
@larbish sounds good to me. I'll review and update my code tomorrow.