Package com.clickhouse.client.api.query
Class QuerySettings
java.lang.Object
com.clickhouse.client.api.query.QuerySettings
- Direct Known Subclasses:
CommandSettings
Query settings class represents a set of settings that can be used to customize query execution.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet raw settings.com.clickhouse.data.ClickHouseFormatGets a configuration option.setDatabase(String database) Sets database to be used for a request.setFormat(com.clickhouse.data.ClickHouseFormat format) Sets output format for a server response.setMaxExecutionTime(Integer maxExecutionTime) Maximum query execution time in seconds on server.Sets a configuration option.setQueryId(String queryId) Sets the query id.setReadBufferSize(Integer size) Read buffer is used for reading data from a server.setUseServerTimeZone(Boolean useServerTimeZone) setUseTimeZone(String timeZone) waitEndOfQuery(Boolean waitEndOfQuery) Requests the server to wait for the and of the query before sending response.
-
Field Details
-
MINIMAL_READ_BUFFER_SIZE
public static final int MINIMAL_READ_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
QuerySettings
public QuerySettings()
-
-
Method Details
-
setOption
Sets a configuration option. This method can be used to set any configuration option. There is no specific validation is done on the key or value.- Parameters:
option- - configuration option namevalue- - configuration option value
-
getOption
Gets a configuration option.- Parameters:
option- - configuration option name- Returns:
- configuration option value
-
getAllSettings
Get raw settings. Returns reference to internal map, so any changes will affect this object.- Returns:
- all settings map
-
setQueryId
Sets the query id. This id will be sent to the server and can be used to identify the query. -
getQueryId
-
setReadBufferSize
Read buffer is used for reading data from a server. Size is in bytes. Minimal value is 8192 bytes. -
getReadBufferSize
-
setFormat
Sets output format for a server response. -
getFormat
public com.clickhouse.data.ClickHouseFormat getFormat() -
setMaxExecutionTime
Maximum query execution time in seconds on server. 0 means no limit. If query is not finished in this time then server will send an exception. -
getMaxExecutionTime
-
setDatabase
Sets database to be used for a request. -
getDatabase
-
waitEndOfQuery
Requests the server to wait for the and of the query before sending response. Useful for getting accurate summary. -
setUseServerTimeZone
-
getUseServerTimeZone
-
setUseTimeZone
-
getServerTimeZone
-