Skip to content

Commit fb4626d

Browse files
committed
feat: add ChangeSchema function to supabase.Client
Add a ChangeSchema function to supabase Client that wraps the postgrest ChangeSchema method
1 parent e2efa13 commit fb4626d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ func (c *Client) From(table string) *postgrest.QueryBuilder {
8888
return c.rest.From(table)
8989
}
9090

91+
// Wrap postgrest ChangeSchema method
92+
// ChangeSchema changes the schema of the client.
93+
func (c *Client) ChangeSchema(schema string) *Client {
94+
c.rest = c.rest.ChangeSchema(schema)
95+
return c
96+
}
97+
9198
// Wrap postgrest Rpc method
9299
// Rpc returns a string for the specified function.
93100
func (c *Client) Rpc(name, count string, rpcBody interface{}) string {

0 commit comments

Comments
 (0)