Skip to content

Latest commit

 

History

History
77 lines (48 loc) · 2.09 KB

UtilsAPI.md

File metadata and controls

77 lines (48 loc) · 2.09 KB

\UtilsAPI

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

Method HTTP request Description
Sql Post /sql Perform SQL requests

Sql

SqlResponse Sql(ctx).Body(body).RawResponse(rawResponse).Execute()

Perform SQL requests

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/manticoresoftware/manticoresearch-go"
)

func main() {
	body := "SHOW TABLES" // string | A query parameter string. 
	rawResponse := true // bool | Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'.  (optional) (default to true)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.UtilsAPI.Sql(context.Background()).Body(body).RawResponse(rawResponse).Execute()
	if err != nil {
		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`: SqlResponse
	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 A query parameter string.
rawResponse bool Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'. [default to true]

Return type

SqlResponse

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]