Documentation
¶
Overview ¶
Package sql exposes the Elasticsearch SQL endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Search ¶
Search runs a SQL query and renders the rows it produced
@Id SQLSearch @Summary SQL search for compatible ES @security BasicAuth @Tags Search @Accept json @Description The response format is the body format, else the format query parameter, else the Accept header (text/plain, text/csv, text/tab-separated-values), else JSON. @Produce json,text/plain,text/csv,text/tab-separated-values @Param query body sql.Request true "Query" @Param format query string false "Response format: json, txt, csv, tsv" @Success 200 {object} zedsql.Response "JSON format; txt, csv and tsv return plain text rows" @Failure 400 {object} meta.HTTPResponseError @Router /es/_sql [post]
func Translate ¶
Translate returns the query DSL a SQL query maps to
@Id SQLTranslate @Summary SQL translate to query DSL for compatible ES @security BasicAuth @Tags Search @Accept json @Produce json @Param query body sql.Request true "Query" @Success 200 {object} map[string]interface{} @Failure 400 {object} meta.HTTPResponseError @Router /es/_sql/translate [post]