Package com.clickhouse.client
Class ClickHouseRequest.Mutation
java.lang.Object
com.clickhouse.client.ClickHouseRequest<ClickHouseRequest.Mutation>
com.clickhouse.client.ClickHouseRequest.Mutation
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ClickHouseRequest<SelfT extends ClickHouseRequest<SelfT>>
public static class ClickHouseRequest.Mutation
extends ClickHouseRequest<ClickHouseRequest.Mutation>
Mutation request.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.clickhouse.client.ClickHouseRequest
ClickHouseRequest.Mutation -
Field Summary
Fields inherited from class com.clickhouse.client.ClickHouseRequest
changeListener, config, externalTables, input, managerRef, namedParameters, options, output, preparedQuery, queryId, server, serverListener, serverRef, settings, sql, statements, txRef, writer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoads data from deferred input stream.data(ClickHouseInputStream input) Loads data from input stream.data(ClickHousePassThruStream stream) Loads data from the given pass-thru stream which may or may not be compressed.data(ClickHouseWriter writer) Sets custom writer for writing uncompressed data, usedata(ClickHousePassThruStream)when the data is compressed.data(InputStream input) Loads data from input stream.Loads data from the given file.data(String file, ClickHouseCompression compression) Loads compressed data from the given file.data(String file, ClickHouseCompression compression, int compressionLevel) Loads compressed data from the given file.format(ClickHouseFormat format) Sets format to be used for communication between server and client.protected StringgetQuery()Gets query, either set byquery()ortable().seal()Creates a sealed request, which is an immutable copy of the current request.Sets target table and optionally query id.Methods inherited from class com.clickhouse.client.ClickHouseRequest
addExternal, changeProperty, changeServer, checkSealed, clearSession, clearSettings, compressServerResponse, compressServerResponse, compressServerResponse, compressServerResponse, copy, decompressClientRequest, decompressClientRequest, decompressClientRequest, decompressClientRequest, execute, executeAndWait, executeWithinTransaction, executeWithinTransaction, external, external, freezeOptions, freezeSettings, getChangeListener, getClient, getConfig, getExternalTables, getFormat, getInputStream, getManager, getOutputStream, getPreparedQuery, getQueryId, getServer, getServerListener, getSessionId, getSetting, getSetting, getSettings, getStatements, getStatements, getTransaction, getWriter, hasInputStream, hasOption, hasOption, hasOutputStream, hasSetting, isSealed, isTransactional, manager, option, options, options, output, output, output, output, output, output, output, params, params, params, params, params, params, params, params, query, query, query, query, removeExternal, removeExternal, removeOption, removeSetting, reset, resetCache, session, session, session, session, set, set, setChangeListener, setServerListener, settings, table, transaction, transaction, transaction, unfreezeOptions, unfreezeSettings, use, write
-
Constructor Details
-
Mutation
-
-
Method Details
-
getQuery
Description copied from class:ClickHouseRequestGets query, either set byquery()ortable().- Overrides:
getQueryin classClickHouseRequest<ClickHouseRequest.Mutation>- Returns:
- sql query
-
format
Description copied from class:ClickHouseRequestSets format to be used for communication between server and client.- Overrides:
formatin classClickHouseRequest<ClickHouseRequest.Mutation>- Parameters:
format- preferred format,nullmeans reset to default- Returns:
- the request itself
-
data
Sets custom writer for writing uncompressed data, usedata(ClickHousePassThruStream)when the data is compressed. This will remove input stream set by otherdata(...)methods.- Parameters:
writer- writer- Returns:
- mutation request
-
data
Loads data from the given pass-thru stream which may or may not be compressed. This will not only remove custom writer set bydata(ClickHouseWriter), but may also update compression and format.- Parameters:
stream- pass-thru stream, could be a file and may or may not be compressed- Returns:
- mutation request
-
data
Loads data from the given file. It's same asdata(ClickHouseFile.of(file))if the file name implies compression algorithm and/or format(e.g.some_file.csv.gz). It fall back todata(InputStream)if no clue. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
file- absolute or relative path of the file, file extension will be used to determine if it's compressed or not- Returns:
- mutation request
-
data
Loads compressed data from the given file. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
file- absolute or relative path of the filecompression- compression algorithm, null orClickHouseCompression.NONEmeans no compression- Returns:
- mutation request
-
data
public ClickHouseRequest.Mutation data(String file, ClickHouseCompression compression, int compressionLevel) Loads compressed data from the given file. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
file- absolute or relative path of the filecompression- compression algorithm, null orClickHouseCompression.NONEmeans no compressioncompressionLevel- compression level, usecom.clickhouse.data.ClickHouseDataConfig#DEFAULT_READ_COMPRESS_LEVELto use recommended level for the algorithm- Returns:
- mutation request
-
data
Loads data from input stream. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
input- input stream- Returns:
- mutation request
-
data
Loads data from input stream. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
input- input stream- Returns:
- mutation request
-
data
Loads data from deferred input stream. This will remove custom writer set bydata(ClickHouseWriter).- Parameters:
input- input stream- Returns:
- mutation request
-
table
Description copied from class:ClickHouseRequestSets target table and optionally query id. This will generate a query likeSELECT * FROM [table]and override the one set byClickHouseRequest.query(String, String).- Overrides:
tablein classClickHouseRequest<ClickHouseRequest.Mutation>- Parameters:
table- non-empty table namequeryId- query id, null means no query id- Returns:
- the request itself
-
seal
Description copied from class:ClickHouseRequestCreates a sealed request, which is an immutable copy of the current request. Listeners won't be copied to the sealed instance, because it's immutable.- Overrides:
sealin classClickHouseRequest<ClickHouseRequest.Mutation>- Returns:
- sealed request, an immutable copy of the current request
-