MCPcopy Index your code
hub / github.com/uber/aresdb / FetchSchema

Method FetchSchema

controller/client/controller.go:217–229  ·  view source on GitHub ↗

FetchSchema fetch one schema for given table

(tableName string)

Source from the content-addressed store, hash-verified

215
216// FetchSchema fetch one schema for given table
217func (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
232func (c *ControllerHTTPClient) FetchAllEnums(tableName string, columnName string) (enumDictReponse []string, err error) {

Callers

nothing calls this directly

Calls 3

buildRequestMethod · 0.95
getJSONResponseMethod · 0.95
StackErrorFunction · 0.92

Tested by

no test coverage detected