Add support for user functions (#608)
* Add initial support for functions * Show functions definitions * Fix client tests * Fix schema objects search * Perform partial matching for functions * Add function test * Make sure to close client connections so that database could be dropped in tests * Fix lint * Allow to copy the view/functions definitions * Nits
This commit is contained in:
@@ -197,6 +197,10 @@ func (client *Client) MaterializedView(name string) (*Result, error) {
|
||||
return client.query(statements.MaterializedView, name)
|
||||
}
|
||||
|
||||
func (client *Client) Function(id string) (*Result, error) {
|
||||
return client.query(statements.Function, id)
|
||||
}
|
||||
|
||||
func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error) {
|
||||
schema, table := getSchemaAndTable(table)
|
||||
sql := fmt.Sprintf(`SELECT * FROM "%s"."%s"`, schema, table)
|
||||
|
||||
Reference in New Issue
Block a user