Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 2.23 KB

UtilsApi.md

File metadata and controls

75 lines (46 loc) · 2.23 KB

\UtilsApi

All URIs are relative to http://127.0.0.1:9308

Method HTTP request Description
Sql Post /sql Perform SQL requests

Sql

map[string]map[string]interface{} Sql(ctx).Body(body).Execute()

Perform SQL requests

Example

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)
}

Path Parameters

Other Parameters

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.

Return type

map[string]map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]