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

ChangeSchema function in supabase.Client #17

Open
hemanth-gopi opened this issue Jul 8, 2024 · 1 comment
Open

ChangeSchema function in supabase.Client #17

hemanth-gopi opened this issue Jul 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@hemanth-gopi
Copy link

Feature request

ChangeSchema function required to work with different schemas

Describe the solution you'd like

rest field is private for some reason in the supabase.Client

type Client struct {
	// Why is this a private field??
	rest    *postgrest.Client
        ....
}

So it is not possible to write a wrapper function as well. Hence providing a ChangeSchema function would help change the schema once the client is initialised

func (c *Client) ChangeSchema(schema string) (*Client, error) {
    c.rest = c.rest.ChangeSchema(schema)
    return c
}
@hemanth-gopi hemanth-gopi added the enhancement New feature or request label Jul 8, 2024
@hemanth-gopi
Copy link
Author

hemanth-gopi commented Jul 8, 2024

Created a PR with the above enhancements
Closes #18

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

1 participant