FetchAllEnums fetches all enums for given table and column
(tableName string, columnName string)
| 230 | |
| 231 | // FetchAllEnums fetches all enums for given table and column |
| 232 | func (c *ControllerHTTPClient) FetchAllEnums(tableName string, columnName string) (enumDictReponse []string, err error) { |
| 233 | request, err := c.buildRequest(http.MethodGet, fmt.Sprintf("schema/%s/tables/%s/columns/%s/enum-cases", c.namespace, tableName, columnName), nil) |
| 234 | if err != nil { |
| 235 | return |
| 236 | } |
| 237 | |
| 238 | err = c.getJSONResponse(request, &enumDictReponse) |
| 239 | if err != nil { |
| 240 | err = utils.StackError(err, "controller client error fetching schema for table: %s", tableName) |
| 241 | return |
| 242 | } |
| 243 | return |
| 244 | } |
| 245 | |
| 246 | // ExtendEnumCases extends enum cases to given table column |
| 247 | func (c *ControllerHTTPClient) ExtendEnumCases(tableName, columnName string, enumCases []string) (enumIDs []int, err error) { |
nothing calls this directly
no test coverage detected