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 ClearCursorResponse
clearCursor(ClearCursorRequest request)
Clears the SQL cursorClearCursorResponse
clearCursor(java.util.function.Function<ClearCursorRequest.Builder,ObjectBuilder<ClearCursorRequest>> fn)
Clears the SQL cursorDeleteAsyncResponse
deleteAsync(DeleteAsyncRequest request)
Deletes an async SQL search or a stored synchronous SQL search.DeleteAsyncResponse
deleteAsync(java.util.function.Function<DeleteAsyncRequest.Builder,ObjectBuilder<DeleteAsyncRequest>> fn)
Deletes an async SQL search or a stored synchronous SQL search.GetAsyncResponse
getAsync(GetAsyncRequest request)
Returns the current status and available results for an async SQL search or stored synchronous SQL searchGetAsyncResponse
getAsync(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 searchGetAsyncStatusResponse
getAsyncStatus(GetAsyncStatusRequest request)
Returns the current status of an async SQL search or a stored synchronous SQL searchGetAsyncStatusResponse
getAsyncStatus(java.util.function.Function<GetAsyncStatusRequest.Builder,ObjectBuilder<GetAsyncStatusRequest>> fn)
Returns the current status of an async SQL search or a stored synchronous SQL searchQueryResponse
query()
Executes a SQL requestQueryResponse
query(QueryRequest request)
Executes a SQL requestQueryResponse
query(java.util.function.Function<QueryRequest.Builder,ObjectBuilder<QueryRequest>> fn)
Executes a SQL requestTranslateResponse
translate(TranslateRequest request)
Translates SQL into Elasticsearch queriesTranslateResponse
translate(java.util.function.Function<TranslateRequest.Builder,ObjectBuilder<TranslateRequest>> fn)
Translates SQL into Elasticsearch queriesElasticsearchSqlClient
withTransportOptions(TransportOptions transportOptions)
Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializer, withTransportOptions
Methods 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:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,ElasticsearchSqlClient>
-
clearCursor
public ClearCursorResponse clearCursor(ClearCursorRequest request) throws java.io.IOException, ElasticsearchExceptionClears the SQL cursor- Throws:
java.io.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- See Also:
- Documentation on elastic.co
-
query
public QueryResponse query(QueryRequest request) throws java.io.IOException, ElasticsearchExceptionExecutes a SQL request- Throws:
java.io.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- See Also:
- Documentation on elastic.co
-
query
Executes a SQL request- Throws:
java.io.IOException
ElasticsearchException
- See Also:
- Documentation on elastic.co
-
translate
public TranslateResponse translate(TranslateRequest request) throws java.io.IOException, ElasticsearchExceptionTranslates SQL into Elasticsearch queries- Throws:
java.io.IOException
ElasticsearchException
- 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.IOException
ElasticsearchException
- See Also:
- Documentation on elastic.co
-