Package com.clickhouse.client.api.insert
Class InsertSettings
java.lang.Object
com.clickhouse.client.api.insert.InsertSettings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappCompressedData(boolean enabled, String compressionMethod) Sets flag that indicates if application provides already compressed datacompressClientRequest(boolean enabled) Client request compression.Get all settings as an unmodifiable map.Gets DB roles for an operation.intOperation id.Gets a configuration option.httpHeader(String key, String value) Defines list of headers that should be sent with current request.httpHeader(String key, Collection<String> values) but for multiple values.httpHeaders(Map<String, String> headers) but for multiple headers.booleanlogComment(String logComment) Sets the comment that will be added to the query log record associated with the query.serverSetting(String name, String value) Defines list of server settings that should be sent with each request.serverSetting(String name, Collection<String> values) but for multiple values.setDatabase(String database) Sets database to be used for a request.setDBRoles(Collection<String> dbRoles) Sets DB roles for an operation.setDeduplicationToken(String token) Sets the deduplication token.setInputStreamCopyBufferSize(int size) Copy buffer size.setOperationId(String operationId) Operation id.Sets a configuration option.setQueryId(String queryId) Sets the query id.useHttpCompression(boolean enabled)
-
Constructor Details
-
InsertSettings
public InsertSettings() -
InsertSettings
-
-
Method Details
-
getOption
Gets a configuration option.- Parameters:
option- - configuration option name- Returns:
- configuration option value
-
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
-
getAllSettings
Get all settings as an unmodifiable map.- Returns:
- all settings
-
setDeduplicationToken
Sets the deduplication token. This token will be sent to the server and can be used to identify the query.- Parameters:
token- - deduplication token- Returns:
-
getQueryId
-
setQueryId
Sets the query id. This id will be sent to the server and can be used to identify the query. -
getInputStreamCopyBufferSize
public int getInputStreamCopyBufferSize() -
setInputStreamCopyBufferSize
Copy buffer size. The buffer is used while write operation to copy data from user provided input stream to an output stream. -
getOperationId
Operation id. Used internally to register new operation. Should not be called directly. -
setOperationId
Operation id. Used internally to register new operation. Should not be called directly.- Parameters:
operationId- - operation id
-
setDatabase
Sets database to be used for a request. -
getDatabase
-
compressClientRequest
Client request compression. If set to true client will compress the request.- Parameters:
enabled- - indicates if client request compression is enabled
-
useHttpCompression
-
appCompressedData
Sets flag that indicates if application provides already compressed data- Parameters:
enabled- - if application provides compressed data
-
isClientRequestEnabled
public boolean isClientRequestEnabled() -
httpHeader
Defines list of headers that should be sent with current request. The Client will use a header value defined inheadersinstead of any other.- Parameters:
key- - header name.value- - header value.- Returns:
- same instance of the builder
- See Also:
-
httpHeader
but for multiple values.- Parameters:
key- - name of the headervalues- - collection of values- Returns:
- same instance of the builder
-
httpHeaders
but for multiple headers.- Parameters:
headers- - map of headers- Returns:
- same instance of the builder
-
serverSetting
Defines list of server settings that should be sent with each request. The Client will use a setting value defined insettingsinstead of any other. Operation settings may override these values.- Parameters:
name- - name of the settingvalue- - value of the setting- Returns:
- same instance of the builder
- See Also:
-
serverSetting
but for multiple values.- Parameters:
name- - name of the setting without special prefixvalues- - collection of values- Returns:
- same instance of the builder
-
setDBRoles
Sets DB roles for an operation. Roles that were set byClient.setDBRoles(Collection)will be overridden.- Parameters:
dbRoles-
-
getDBRoles
Gets DB roles for an operation.- Returns:
- list of DB roles
-
logComment
Sets the comment that will be added to the query log record associated with the query.- Parameters:
logComment- - comment to be added to the log- Returns:
- same instance of the builder
-
getLogComment
-