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
Constructors Constructor Description ElasticsearchSqlClient(ElasticsearchTransport transport)ElasticsearchSqlClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and Type Method Description ClearCursorResponseclearCursor(ClearCursorRequest request)Clears the SQL cursorClearCursorResponseclearCursor(java.util.function.Function<ClearCursorRequest.Builder,ObjectBuilder<ClearCursorRequest>> fn)Clears the SQL cursorDeleteAsyncResponsedeleteAsync(DeleteAsyncRequest request)Deletes an async SQL search or a stored synchronous SQL search.DeleteAsyncResponsedeleteAsync(java.util.function.Function<DeleteAsyncRequest.Builder,ObjectBuilder<DeleteAsyncRequest>> fn)Deletes an async SQL search or a stored synchronous SQL search.GetAsyncResponsegetAsync(GetAsyncRequest request)Returns the current status and available results for an async SQL search or stored synchronous SQL searchGetAsyncResponsegetAsync(java.util.function.Function<GetAsyncRequest.Builder,ObjectBuilder<GetAsyncRequest>> fn)Returns the current status and available results for an async SQL search or stored synchronous SQL searchGetAsyncStatusResponsegetAsyncStatus(GetAsyncStatusRequest request)Returns the current status of an async SQL search or a stored synchronous SQL searchGetAsyncStatusResponsegetAsyncStatus(java.util.function.Function<GetAsyncStatusRequest.Builder,ObjectBuilder<GetAsyncStatusRequest>> fn)Returns the current status of an async SQL search or a stored synchronous SQL searchQueryResponsequery()Executes a SQL requestQueryResponsequery(QueryRequest request)Executes a SQL requestQueryResponsequery(java.util.function.Function<QueryRequest.Builder,ObjectBuilder<QueryRequest>> fn)Executes a SQL requestTranslateResponsetranslate(TranslateRequest request)Translates SQL into Elasticsearch queriesTranslateResponsetranslate(java.util.function.Function<TranslateRequest.Builder,ObjectBuilder<TranslateRequest>> fn)Translates SQL into Elasticsearch queriesElasticsearchSqlClientwithTransportOptions(TransportOptions transportOptions)Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_transport, _transportOptions, getDeserializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 java.io.IOException, ElasticsearchExceptionClears the SQL cursor- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
clearCursor
public final ClearCursorResponse clearCursor(java.util.function.Function<ClearCursorRequest.Builder,ObjectBuilder<ClearCursorRequest>> fn) throws java.io.IOException, ElasticsearchExceptionClears the SQL cursor- Parameters:
fn- a function that initializes a builder to create theClearCursorRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
deleteAsync
public DeleteAsyncResponse deleteAsync(DeleteAsyncRequest request) throws java.io.IOException, ElasticsearchExceptionDeletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
deleteAsync
public final DeleteAsyncResponse deleteAsync(java.util.function.Function<DeleteAsyncRequest.Builder,ObjectBuilder<DeleteAsyncRequest>> fn) throws java.io.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:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getAsync
public GetAsyncResponse getAsync(GetAsyncRequest request) throws java.io.IOException, ElasticsearchExceptionReturns the current status and available results for an async SQL search or stored synchronous SQL search- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getAsync
public final GetAsyncResponse getAsync(java.util.function.Function<GetAsyncRequest.Builder,ObjectBuilder<GetAsyncRequest>> fn) throws java.io.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:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getAsyncStatus
public GetAsyncStatusResponse getAsyncStatus(GetAsyncStatusRequest request) throws java.io.IOException, ElasticsearchExceptionReturns the current status of an async SQL search or a stored synchronous SQL search- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getAsyncStatus
public final GetAsyncStatusResponse getAsyncStatus(java.util.function.Function<GetAsyncStatusRequest.Builder,ObjectBuilder<GetAsyncStatusRequest>> fn) throws java.io.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:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
query
public QueryResponse query(QueryRequest request) throws java.io.IOException, ElasticsearchExceptionExecutes a SQL request- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
query
public final QueryResponse query(java.util.function.Function<QueryRequest.Builder,ObjectBuilder<QueryRequest>> fn) throws java.io.IOException, ElasticsearchExceptionExecutes a SQL request- Parameters:
fn- a function that initializes a builder to create theQueryRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
query
Executes a SQL request- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
translate
public TranslateResponse translate(TranslateRequest request) throws java.io.IOException, ElasticsearchExceptionTranslates SQL into Elasticsearch queries- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
translate
public final TranslateResponse translate(java.util.function.Function<TranslateRequest.Builder,ObjectBuilder<TranslateRequest>> fn) throws java.io.IOException, ElasticsearchExceptionTranslates SQL into Elasticsearch queries- Parameters:
fn- a function that initializes a builder to create theTranslateRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-