Package ru.yandex.clickhouse

## Class ClickHouseStatementImpl

- java.lang.Object
- - ru.yandex.clickhouse.ClickHouseStatementImpl

All Implemented Interfaces:
  `AutoCloseable`, `Statement`, `Wrapper`, `ClickHouseStatement`

Direct Known Subclasses:
  `ClickHousePreparedStatementImpl`

    public class ClickHouseStatementImpl
    extends Object
    implements ClickHouseStatement

### Nested Class Summary

Nested Classes
`protected static class` `ClickHouseStatementImpl.WrappedHttpEntity`

### Field Summary

Fields
`protected List<ClickHouseSqlStatement>` `batchStmts`
`protected String` `currentDatabase` Current database name may be changed by `Connection.setCatalog(String)` between creation of this object and query execution, but javadoc does not allow `setCatalog` influence on already created statements.
`protected ClickHouseSqlStatement[]` `parsedStmts`
`protected ClickHouseProperties` `properties`
`protected ClickHouseStatementImpl` `statement`

### Fields inherited from interface java.sql.Statement

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

### Constructor Summary

Constructors
`ClickHouseStatementImpl​(org.apache.http.impl.client.CloseableHttpClient client, ClickHouseConnection connection, ClickHouseProperties properties, int resultSetType)`

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addBatch​(String sql)`
`T` `addDbParam​(ClickHouseQueryParam param, String value)`
`protected ClickHouseSqlStatement` `applyFormat​(ClickHouseSqlStatement stmt, ClickHouseFormat preferredFormat)`
`void` `cancel()`
`void` `clearBatch()`
`void` `clearWarnings()`
`void` `close()`
`void` `closeOnCompletion()`
`boolean` `execute​(String sql)`
`boolean` `execute​(String sql, int autoGeneratedKeys)`
`boolean` `execute​(String sql, int[] columnIndexes)`
`boolean` `execute​(String sql, String[] columnNames)`
`int[]` `executeBatch()`
`ResultSet` `executeQuery​(String sql)`
`ResultSet` `executeQuery​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`ResultSet` `executeQuery​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, List<ClickHouseExternalData> externalData)`
`ResultSet` `executeQuery​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, List<ClickHouseExternalData> externalData, Map<String,​String> additionalRequestParams)`
`protected ClickHouseResponse` `executeQueryClickhouseResponse​(ClickHouseSqlStatement stmt, Map<ClickHouseQueryParam,​String> additionalDBParams, Map<String,​String> additionalRequestParams)`
`ClickHouseResponse` `executeQueryClickhouseResponse​(String sql)`
`ClickHouseResponse` `executeQueryClickhouseResponse​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`ClickHouseResponse` `executeQueryClickhouseResponse​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, Map<String,​String> additionalRequestParams)`
`ClickHouseRowBinaryInputStream` `executeQueryClickhouseRowBinaryStream​(String sql)`
`ClickHouseRowBinaryInputStream` `executeQueryClickhouseRowBinaryStream​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`ClickHouseRowBinaryInputStream` `executeQueryClickhouseRowBinaryStream​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, Map<String,​String> additionalRequestParams)`
`protected ResultSet` `executeQueryStatement​(ClickHouseSqlStatement stmt, Map<ClickHouseQueryParam,​String> additionalDBParams, List<ClickHouseExternalData> externalData, Map<String,​String> additionalRequestParams)`
`protected int` `executeStatement​(ClickHouseSqlStatement stmt, Map<ClickHouseQueryParam,​String> additionalDBParams, List<ClickHouseExternalData> externalData, Map<String,​String> additionalRequestParams)`
`int` `executeUpdate​(String sql)`
`int` `executeUpdate​(String sql, int autoGeneratedKeys)`
`int` `executeUpdate​(String sql, int[] columnIndexes)`
`int` `executeUpdate​(String sql, String[] columnNames)`
`ClickHouseConnection` `getConnection()`
`int` `getFetchDirection()`
`int` `getFetchSize()`
`ResultSet` `getGeneratedKeys()`
`protected ClickHouseSqlStatement` `getLastStatement()`
`int` `getMaxFieldSize()`
`int` `getMaxRows()`
`boolean` `getMoreResults()`
`boolean` `getMoreResults​(int current)`
`protected String` `getQueryId()`
`int` `getQueryTimeout()`
`ClickHouseResponseSummary` `getResponseSummary()`
`ResultSet` `getResultSet()`
`int` `getResultSetConcurrency()`
`int` `getResultSetHoldability()`
`int` `getResultSetType()`
`int` `getUpdateCount()`
`SQLWarning` `getWarnings()`
`protected Map<ClickHouseQueryParam,​String>` `importAdditionalDBParameters​(Map<ClickHouseQueryParam,​String> additionalDBParams)`
`boolean` `isClosed()`
`boolean` `isCloseOnCompletion()`
`boolean` `isPoolable()`
`boolean` `isWrapperFor​(Class<?> iface)`
`T` `option​(String key, String value)`
`T` `options​(Map<String,​String> params)`
`protected ClickHouseSqlStatement[]` `parseSqlStatements​(String sql)`
`protected ClickHouseSqlStatement` `parseSqlStatements​(String sql, ClickHouseFormat preferredFormat, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`protected <T> T` `readJsonResponse​(InputStream input, Class<T> clazz)`
`T` `removeDbParam​(ClickHouseQueryParam param)`
`T` `removeOption​(String key)`
`void` `sendCSVStream​(InputStream content, String table)`
`void` `sendCSVStream​(InputStream content, String table, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`void` `sendNativeStream​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, ClickHouseStreamCallback callback)`
`void` `sendNativeStream​(String sql, ClickHouseStreamCallback callback)`
`void` `sendRowBinaryStream​(String sql, Map<ClickHouseQueryParam,​String> additionalDBParams, ClickHouseStreamCallback callback)`
`void` `sendRowBinaryStream​(String sql, ClickHouseStreamCallback callback)`
`void` `sendStream​(InputStream content, String table)`
`void` `sendStream​(InputStream content, String table, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`void` `sendStream​(org.apache.http.HttpEntity content, String sql)` Deprecated.
`void` `sendStream​(org.apache.http.HttpEntity content, String sql, Map<ClickHouseQueryParam,​String> additionalDBParams)` Deprecated.
`void` `sendStreamSQL​(InputStream content, String sql)`
`void` `sendStreamSQL​(InputStream content, String sql, Map<ClickHouseQueryParam,​String> additionalDBParams)`
`void` `setCursorName​(String name)`
`void` `setEscapeProcessing​(boolean enable)`
`void` `setFetchDirection​(int direction)`
`void` `setFetchSize​(int rows)`
`protected void` `setLastStatement​(ClickHouseSqlStatement stmt)`
`void` `setMaxFieldSize​(int max)`
`void` `setMaxRows​(int max)`
`void` `setPoolable​(boolean poolable)`
`void` `setQueryTimeout​(int seconds)`
`<T> T` `unwrap​(Class<T> iface)`
`protected ResultSet` `updateResult​(ClickHouseSqlStatement stmt, InputStream is)`
`T` `withDbParams​(Map<ClickHouseQueryParam,​String> dbParams)`
`Writer` `write()` Returns extended write-API, which simplifies uploading larger files or data streams.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.sql.Statement

`enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows`

### Field Detail

#### properties

    protected ClickHouseProperties properties

#### parsedStmts

    protected ClickHouseSqlStatement[] parsedStmts

#### batchStmts

    protected List<ClickHouseSqlStatement> batchStmts

#### currentDatabase

    protected String currentDatabase

Current database name may be changed by `Connection.setCatalog(String)` between creation of this object and query execution, but javadoc does not allow `setCatalog` influence on already created statements.

#### statement

    protected final ClickHouseStatementImpl statement

### Constructor Detail

#### ClickHouseStatementImpl

    public ClickHouseStatementImpl​(org.apache.http.impl.client.CloseableHttpClient client,
                                   ClickHouseConnection connection,
                                   ClickHouseProperties properties,
                                   int resultSetType)

### Method Detail

#### getQueryId

    protected String getQueryId()

#### getLastStatement

    protected ClickHouseSqlStatement getLastStatement()

#### setLastStatement

    protected void setLastStatement​(ClickHouseSqlStatement stmt)

#### parseSqlStatements

    protected ClickHouseSqlStatement[] parseSqlStatements​(String sql)
                                                   throws SQLException

Throws:
  `SQLException`

#### parseSqlStatements

    protected ClickHouseSqlStatement parseSqlStatements​(String sql,
                                                        ClickHouseFormat preferredFormat,
                                                        Map<ClickHouseQueryParam,​String> additionalDBParams)
                                                 throws SQLException

Throws:
  `SQLException`

#### applyFormat

    protected ClickHouseSqlStatement applyFormat​(ClickHouseSqlStatement stmt,
                                                 ClickHouseFormat preferredFormat)

#### importAdditionalDBParameters

    protected Map<ClickHouseQueryParam,​String> importAdditionalDBParameters​(Map<ClickHouseQueryParam,​String> additionalDBParams)

#### readJsonResponse

    protected <T> T readJsonResponse​(InputStream input,
                                     Class<T> clazz)
                              throws IOException

Throws:
  `IOException`

#### updateResult

    protected ResultSet updateResult​(ClickHouseSqlStatement stmt,
                                     InputStream is)
                              throws IOException,
                                     ClickHouseException

Throws:
  `IOException`
  `ClickHouseException`

#### executeStatement

    protected int executeStatement​(ClickHouseSqlStatement stmt,
                                   Map<ClickHouseQueryParam,​String> additionalDBParams,
                                   List<ClickHouseExternalData> externalData,
                                   Map<String,​String> additionalRequestParams)
                            throws SQLException

Throws:
  `SQLException`

#### executeQueryStatement

    protected ResultSet executeQueryStatement​(ClickHouseSqlStatement stmt,
                                              Map<ClickHouseQueryParam,​String> additionalDBParams,
                                              List<ClickHouseExternalData> externalData,
                                              Map<String,​String> additionalRequestParams)
                                       throws SQLException

Throws:
  `SQLException`

#### executeQueryClickhouseResponse

    protected ClickHouseResponse executeQueryClickhouseResponse​(ClickHouseSqlStatement stmt,
                                                                Map<ClickHouseQueryParam,​String> additionalDBParams,
                                                                Map<String,​String> additionalRequestParams)
                                                         throws SQLException

Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery​(String sql)
                           throws SQLException

Specified by:
  `executeQuery` in interface `Statement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery​(String sql,
                                  Map<ClickHouseQueryParam,​String> additionalDBParams)
                           throws SQLException

Specified by:
  `executeQuery` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery​(String sql,
                                  Map<ClickHouseQueryParam,​String> additionalDBParams,
                                  List<ClickHouseExternalData> externalData)
                           throws SQLException

Specified by:
  `executeQuery` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery​(String sql,
                                  Map<ClickHouseQueryParam,​String> additionalDBParams,
                                  List<ClickHouseExternalData> externalData,
                                  Map<String,​String> additionalRequestParams)
                           throws SQLException

Specified by:
  `executeQuery` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseResponse

    public ClickHouseResponse executeQueryClickhouseResponse​(String sql)
                                                      throws SQLException

Specified by:
  `executeQueryClickhouseResponse` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseResponse

    public ClickHouseResponse executeQueryClickhouseResponse​(String sql,
                                                             Map<ClickHouseQueryParam,​String> additionalDBParams)
                                                      throws SQLException

Specified by:
  `executeQueryClickhouseResponse` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseResponse

    public ClickHouseResponse executeQueryClickhouseResponse​(String sql,
                                                             Map<ClickHouseQueryParam,​String> additionalDBParams,
                                                             Map<String,​String> additionalRequestParams)
                                                      throws SQLException

Specified by:
  `executeQueryClickhouseResponse` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseRowBinaryStream

    public ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream​(String sql)
                                                                         throws SQLException

Specified by:
  `executeQueryClickhouseRowBinaryStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseRowBinaryStream

    public ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream​(String sql,
                                                                                Map<ClickHouseQueryParam,​String> additionalDBParams)
                                                                         throws SQLException

Specified by:
  `executeQueryClickhouseRowBinaryStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeQueryClickhouseRowBinaryStream

    public ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream​(String sql,
                                                                                Map<ClickHouseQueryParam,​String> additionalDBParams,
                                                                                Map<String,​String> additionalRequestParams)
                                                                         throws SQLException

Specified by:
  `executeQueryClickhouseRowBinaryStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

#### close

    public void close()
               throws SQLException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Statement`
Throws:
  `SQLException`

#### getMaxFieldSize

    public int getMaxFieldSize()
                        throws SQLException

Specified by:
  `getMaxFieldSize` in interface `Statement`
Throws:
  `SQLException`

#### setMaxFieldSize

    public void setMaxFieldSize​(int max)
                         throws SQLException

Specified by:
  `setMaxFieldSize` in interface `Statement`
Throws:
  `SQLException`

#### getMaxRows

    public int getMaxRows()
                   throws SQLException

Specified by:
  `getMaxRows` in interface `Statement`
Throws:
  `SQLException`

#### setMaxRows

    public void setMaxRows​(int max)
                    throws SQLException

Specified by:
  `setMaxRows` in interface `Statement`
Throws:
  `SQLException`

#### setEscapeProcessing

    public void setEscapeProcessing​(boolean enable)
                             throws SQLException

Specified by:
  `setEscapeProcessing` in interface `Statement`
Throws:
  `SQLException`

#### getQueryTimeout

    public int getQueryTimeout()
                        throws SQLException

Specified by:
  `getQueryTimeout` in interface `Statement`
Throws:
  `SQLException`

#### setQueryTimeout

    public void setQueryTimeout​(int seconds)
                         throws SQLException

Specified by:
  `setQueryTimeout` in interface `Statement`
Throws:
  `SQLException`

#### cancel

    public void cancel()
                throws SQLException

Specified by:
  `cancel` in interface `Statement`
Throws:
  `SQLException`

#### getWarnings

    public SQLWarning getWarnings()
                           throws SQLException

Specified by:
  `getWarnings` in interface `Statement`
Throws:
  `SQLException`

#### clearWarnings

    public void clearWarnings()
                       throws SQLException

Specified by:
  `clearWarnings` in interface `Statement`
Throws:
  `SQLException`

#### setCursorName

    public void setCursorName​(String name)
                       throws SQLException

Specified by:
  `setCursorName` in interface `Statement`
Throws:
  `SQLException`

#### getResultSet

    public ResultSet getResultSet()
                           throws SQLException

Specified by:
  `getResultSet` in interface `Statement`
Throws:
  `SQLException`

#### getUpdateCount

    public int getUpdateCount()
                       throws SQLException

Specified by:
  `getUpdateCount` in interface `Statement`
Throws:
  `SQLException`

#### getMoreResults

    public boolean getMoreResults()
                           throws SQLException

Specified by:
  `getMoreResults` in interface `Statement`
Throws:
  `SQLException`

#### setFetchDirection

    public void setFetchDirection​(int direction)
                           throws SQLException

Specified by:
  `setFetchDirection` in interface `Statement`
Throws:
  `SQLException`

#### getFetchDirection

    public int getFetchDirection()
                          throws SQLException

Specified by:
  `getFetchDirection` in interface `Statement`
Throws:
  `SQLException`

#### setFetchSize

    public void setFetchSize​(int rows)
                      throws SQLException

Specified by:
  `setFetchSize` in interface `Statement`
Throws:
  `SQLException`

#### getFetchSize

    public int getFetchSize()
                     throws SQLException

Specified by:
  `getFetchSize` in interface `Statement`
Throws:
  `SQLException`

#### getResultSetConcurrency

    public int getResultSetConcurrency()
                                throws SQLException

Specified by:
  `getResultSetConcurrency` in interface `Statement`
Throws:
  `SQLException`

#### getResultSetType

    public int getResultSetType()
                         throws SQLException

Specified by:
  `getResultSetType` in interface `Statement`
Throws:
  `SQLException`

#### addBatch

    public void addBatch​(String sql)
                  throws SQLException

Specified by:
  `addBatch` in interface `Statement`
Throws:
  `SQLException`

#### clearBatch

    public void clearBatch()
                    throws SQLException

Specified by:
  `clearBatch` in interface `Statement`
Throws:
  `SQLException`

#### executeBatch

    public int[] executeBatch()
                       throws SQLException

Specified by:
  `executeBatch` in interface `Statement`
Throws:
  `SQLException`

#### getConnection

    public ClickHouseConnection getConnection()
                                       throws ClickHouseException

Specified by:
  `getConnection` in interface `Statement`
Throws:
  `ClickHouseException`

#### getMoreResults

    public boolean getMoreResults​(int current)
                           throws SQLException

Specified by:
  `getMoreResults` in interface `Statement`
Throws:
  `SQLException`

#### getGeneratedKeys

    public ResultSet getGeneratedKeys()
                               throws SQLException

Specified by:
  `getGeneratedKeys` in interface `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int autoGeneratedKeys)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int[] columnIndexes)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql,
                             String[] columnNames)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql,
                           int autoGeneratedKeys)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql,
                           int[] columnIndexes)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql,
                           String[] columnNames)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

#### getResultSetHoldability

    public int getResultSetHoldability()
                                throws SQLException

Specified by:
  `getResultSetHoldability` in interface `Statement`
Throws:
  `SQLException`

#### isClosed

    public boolean isClosed()
                     throws SQLException

Specified by:
  `isClosed` in interface `Statement`
Throws:
  `SQLException`

#### setPoolable

    public void setPoolable​(boolean poolable)
                     throws SQLException

Specified by:
  `setPoolable` in interface `Statement`
Throws:
  `SQLException`

#### isPoolable

    public boolean isPoolable()
                       throws SQLException

Specified by:
  `isPoolable` in interface `Statement`
Throws:
  `SQLException`

#### unwrap

    public <T> T unwrap​(Class<T> iface)
                 throws SQLException

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`

#### isWrapperFor

    public boolean isWrapperFor​(Class<?> iface)
                         throws SQLException

Specified by:
  `isWrapperFor` in interface `Wrapper`
Throws:
  `SQLException`

#### getResponseSummary

    public ClickHouseResponseSummary getResponseSummary()

Specified by:
  `getResponseSummary` in interface `ClickHouseStatement`

#### sendRowBinaryStream

    public void sendRowBinaryStream​(String sql,
                                    ClickHouseStreamCallback callback)
                             throws SQLException

Specified by:
  `sendRowBinaryStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendRowBinaryStream

    public void sendRowBinaryStream​(String sql,
                                    Map<ClickHouseQueryParam,​String> additionalDBParams,
                                    ClickHouseStreamCallback callback)
                             throws SQLException

Specified by:
  `sendRowBinaryStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendNativeStream

    public void sendNativeStream​(String sql,
                                 ClickHouseStreamCallback callback)
                          throws SQLException

Specified by:
  `sendNativeStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendNativeStream

    public void sendNativeStream​(String sql,
                                 Map<ClickHouseQueryParam,​String> additionalDBParams,
                                 ClickHouseStreamCallback callback)
                          throws SQLException

Specified by:
  `sendNativeStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendCSVStream

    public void sendCSVStream​(InputStream content,
                              String table,
                              Map<ClickHouseQueryParam,​String> additionalDBParams)
                       throws SQLException

Specified by:
  `sendCSVStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendCSVStream

    public void sendCSVStream​(InputStream content,
                              String table)
                       throws SQLException

Specified by:
  `sendCSVStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendStream

    public void sendStream​(InputStream content,
                           String table)
                    throws SQLException

Specified by:
  `sendStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendStream

    public void sendStream​(InputStream content,
                           String table,
                           Map<ClickHouseQueryParam,​String> additionalDBParams)
                    throws SQLException

Specified by:
  `sendStream` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendStream

    @Deprecated
    public void sendStream​(org.apache.http.HttpEntity content,
                           String sql)
                    throws ClickHouseException

Deprecated.

Throws:
  `ClickHouseException`

#### sendStream

    @Deprecated
    public void sendStream​(org.apache.http.HttpEntity content,
                           String sql,
                           Map<ClickHouseQueryParam,​String> additionalDBParams)
                    throws ClickHouseException

Deprecated.

Throws:
  `ClickHouseException`

#### sendStreamSQL

    public void sendStreamSQL​(InputStream content,
                              String sql,
                              Map<ClickHouseQueryParam,​String> additionalDBParams)
                       throws SQLException

Specified by:
  `sendStreamSQL` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### sendStreamSQL

    public void sendStreamSQL​(InputStream content,
                              String sql)
                       throws SQLException

Specified by:
  `sendStreamSQL` in interface `ClickHouseStatement`
Throws:
  `SQLException`

#### closeOnCompletion

    public void closeOnCompletion()
                           throws SQLException

Specified by:
  `closeOnCompletion` in interface `Statement`
Throws:
  `SQLException`

#### isCloseOnCompletion

    public boolean isCloseOnCompletion()
                                throws SQLException

Specified by:
  `isCloseOnCompletion` in interface `Statement`
Throws:
  `SQLException`

#### write

    public Writer write()

Description copied from interface: `ClickHouseStatement`
Returns extended write-API, which simplifies uploading larger files or data streams.

Specified by:
  `write` in interface `ClickHouseStatement`
Returns:
  a new `Writer` builder object which can be used to construct a request to the server

#### addDbParam

    public T addDbParam​(ClickHouseQueryParam param,
                        String value)

#### removeDbParam

    public T removeDbParam​(ClickHouseQueryParam param)

#### withDbParams

    public T withDbParams​(Map<ClickHouseQueryParam,​String> dbParams)

#### options

    public T options​(Map<String,​String> params)

#### option

    public T option​(String key,
                    String value)

#### removeOption

    public T removeOption​(String key)