FetchSchema fetch one schema for given table
(tableName string)
| 215 | |
| 216 | // FetchSchema fetch one schema for given table |
| 217 | func (c *ControllerHTTPClient) FetchSchema(tableName string) (table *metaCom.Table, err error) { |
| 218 | request, err := c.buildRequest(http.MethodGet, fmt.Sprintf("schema/%s/tables/%s", c.namespace, tableName), nil) |
| 219 | if err != nil { |
| 220 | return |
| 221 | } |
| 222 | table = &metaCom.Table{} |
| 223 | err = c.getJSONResponse(request, table) |
| 224 | if err != nil { |
| 225 | err = utils.StackError(err, "controller client error fetching schema for table: %s", tableName) |
| 226 | return |
| 227 | } |
| 228 | return |
| 229 | } |
| 230 | |
| 231 | // FetchAllEnums fetches all enums for given table and column |
| 232 | func (c *ControllerHTTPClient) FetchAllEnums(tableName string, columnName string) (enumDictReponse []string, err error) { |
nothing calls this directly
no test coverage detected