From fb4626d78fdd1d9162a0be4ac6e60cc43811190f Mon Sep 17 00:00:00 2001 From: Hemanth Gopi Date: Mon, 8 Jul 2024 23:40:17 +0530 Subject: [PATCH] feat: add ChangeSchema function to supabase.Client Add a ChangeSchema function to supabase Client that wraps the postgrest ChangeSchema method --- client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.go b/client.go index 674c02a..aa8b6a9 100644 --- a/client.go +++ b/client.go @@ -88,6 +88,13 @@ func (c *Client) From(table string) *postgrest.QueryBuilder { return c.rest.From(table) } +// Wrap postgrest ChangeSchema method +// ChangeSchema changes the schema of the client. +func (c *Client) ChangeSchema(schema string) *Client { + c.rest = c.rest.ChangeSchema(schema) + return c +} + // Wrap postgrest Rpc method // Rpc returns a string for the specified function. func (c *Client) Rpc(name, count string, rpcBody interface{}) string {