All URIs are relative to http://127.0.0.1:9308
Method | HTTP request | Description |
---|---|---|
Sql | Post /sql | Perform SQL requests |
map[string]map[string]interface{} Sql(ctx).Body(body).Execute()
Perform SQL requests
package main
import (
"context"
"fmt"
"os"
openapiclient "./manticoresearch"
)
func main() {
body := "["mode=raw&query=SHOW TABLES"]" // string | Expects is a query parameters string that can be in two modes: * Select only query as `query=SELECT * FROM myindex`. The query string MUST be URL encoded * any type of query in format `mode=raw&query=SHOW TABLES`. The string must be as is (no URL encoding) and `mode` must be first.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UtilsApi.Sql(context.Background()).Body(body).Execute()
if err.Error() != "" {
fmt.Fprintf(os.Stderr, "Error when calling `UtilsApi.Sql``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Sql`: map[string]map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `UtilsApi.Sql`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSqlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | string | Expects is a query parameters string that can be in two modes: * Select only query as `query=SELECT * FROM myindex`. The query string MUST be URL encoded * any type of query in format `mode=raw&query=SHOW TABLES`. The string must be as is (no URL encoding) and `mode` must be first. |
map[string]map[string]interface{}
No authorization required
- Content-Type: text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]