Class ElasticsearchSqlClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchSqlClient>
co.elastic.clients.elasticsearch.sql.ElasticsearchSqlClient
public class ElasticsearchSqlClient
extends ApiClient<ElasticsearchTransport,ElasticsearchSqlClient>
Client for the sql namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSqlClient(ElasticsearchTransport transport) ElasticsearchSqlClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionclearCursor(ClearCursorRequest request) Clears the SQL cursorfinal ClearCursorResponseClears the SQL cursordeleteAsync(DeleteAsyncRequest request) Deletes an async SQL search or a stored synchronous SQL search.final DeleteAsyncResponseDeletes an async SQL search or a stored synchronous SQL search.getAsync(GetAsyncRequest request) Returns the current status and available results for an async SQL search or stored synchronous SQL searchfinal GetAsyncResponseReturns the current status and available results for an async SQL search or stored synchronous SQL searchgetAsyncStatus(GetAsyncStatusRequest request) Returns the current status of an async SQL search or a stored synchronous SQL searchfinal GetAsyncStatusResponseReturns the current status of an async SQL search or a stored synchronous SQL searchquery()Executes a SQL requestquery(QueryRequest request) Executes a SQL requestfinal QueryResponseExecutes a SQL requesttranslate(TranslateRequest request) Translates SQL into Elasticsearch queriesfinal TranslateResponseTranslates SQL into Elasticsearch querieswithTransportOptions(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchSqlClient
-
ElasticsearchSqlClient
public ElasticsearchSqlClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchSqlClient>
-
clearCursor
public ClearCursorResponse clearCursor(ClearCursorRequest request) throws IOException, ElasticsearchException Clears the SQL cursor- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCursor
public final ClearCursorResponse clearCursor(Function<ClearCursorRequest.Builder, ObjectBuilder<ClearCursorRequest>> fn) throws IOException, ElasticsearchExceptionClears the SQL cursor- Parameters:
fn- a function that initializes a builder to create theClearCursorRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteAsync
public DeleteAsyncResponse deleteAsync(DeleteAsyncRequest request) throws IOException, ElasticsearchException Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteAsync
public final DeleteAsyncResponse deleteAsync(Function<DeleteAsyncRequest.Builder, ObjectBuilder<DeleteAsyncRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.- Parameters:
fn- a function that initializes a builder to create theDeleteAsyncRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getAsync
public GetAsyncResponse getAsync(GetAsyncRequest request) throws IOException, ElasticsearchException Returns the current status and available results for an async SQL search or stored synchronous SQL search- Throws:
IOExceptionElasticsearchException- See Also:
-
getAsync
public final GetAsyncResponse getAsync(Function<GetAsyncRequest.Builder, ObjectBuilder<GetAsyncRequest>> fn) throws IOException, ElasticsearchExceptionReturns the current status and available results for an async SQL search or stored synchronous SQL search- Parameters:
fn- a function that initializes a builder to create theGetAsyncRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getAsyncStatus
public GetAsyncStatusResponse getAsyncStatus(GetAsyncStatusRequest request) throws IOException, ElasticsearchException Returns the current status of an async SQL search or a stored synchronous SQL search- Throws:
IOExceptionElasticsearchException- See Also:
-
getAsyncStatus
public final GetAsyncStatusResponse getAsyncStatus(Function<GetAsyncStatusRequest.Builder, ObjectBuilder<GetAsyncStatusRequest>> fn) throws IOException, ElasticsearchExceptionReturns the current status of an async SQL search or a stored synchronous SQL search- Parameters:
fn- a function that initializes a builder to create theGetAsyncStatusRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
query
Executes a SQL request- Throws:
IOExceptionElasticsearchException- See Also:
-
query
public final QueryResponse query(Function<QueryRequest.Builder, ObjectBuilder<QueryRequest>> fn) throws IOException, ElasticsearchExceptionExecutes a SQL request- Parameters:
fn- a function that initializes a builder to create theQueryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
query
Executes a SQL request- Throws:
IOExceptionElasticsearchException- See Also:
-
translate
public TranslateResponse translate(TranslateRequest request) throws IOException, ElasticsearchException Translates SQL into Elasticsearch queries- Throws:
IOExceptionElasticsearchException- See Also:
-
translate
public final TranslateResponse translate(Function<TranslateRequest.Builder, ObjectBuilder<TranslateRequest>> fn) throws IOException, ElasticsearchExceptionTranslates SQL into Elasticsearch queries- Parameters:
fn- a function that initializes a builder to create theTranslateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-