Package com.clickhouse.jdbc.internal

# Class AbstractPreparedStatement

java.lang.Object
com.clickhouse.jdbc.JdbcWrapper
com.clickhouse.jdbc.internal.ClickHouseStatementImpl
com.clickhouse.jdbc.internal.AbstractPreparedStatement

All Implemented Interfaces:
  `com.clickhouse.config.ClickHouseConfigChangeListener<com.clickhouse.client.ClickHouseRequest<?>>`, `ClickHouseStatement`, `AutoCloseable`, `PreparedStatement`, `Statement`, `Wrapper`

Direct Known Subclasses:
  `InputBasedPreparedStatement`, `SqlBasedPreparedStatement`, `StreamBasedPreparedStatement`, `TableBasedPreparedStatement`

public abstract class AbstractPreparedStatement extends ClickHouseStatementImpl implements PreparedStatement

## Field Summary

### Fields inherited from class com.clickhouse.jdbc.internal.ClickHouseStatementImpl

`mapper, parsedStmts`

### 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
Modifier
Constructor
Description
`protected`
`AbstractPreparedStatement(ClickHouseConnectionImpl connection, com.clickhouse.client.ClickHouseRequest<?> request, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`

## Method Summary

Modifier and Type
Method
Description
`final void`
`addBatch(String sql)`
`final boolean`
`execute(String sql)`
`final boolean`
`execute(String sql, int autoGeneratedKeys)`
`final boolean`
`execute(String sql, int[] columnIndexes)`
`final boolean`
`execute(String sql, String[] columnNames)`
`protected abstract long[]`
`executeAny(boolean asBatch)`
`long[]`
`executeLargeBatch()`
`final long`
`executeLargeUpdate(String sql)`
`final long`
`executeLargeUpdate(String sql, int autoGeneratedKeys)`
`final long`
`executeLargeUpdate(String sql, int[] columnIndexes)`
`final long`
`executeLargeUpdate(String sql, String[] columnNames)`
`final ResultSet`
`executeQuery(String sql)`
`final int`
`executeUpdate()`
`final int`
`executeUpdate(String sql)`
`final int`
`executeUpdate(String sql, int autoGeneratedKeys)`
`final int`
`executeUpdate(String sql, int[] columnIndexes)`
`final int`
`executeUpdate(String sql, String[] columnNames)`
`protected abstract int`
`getMaxParameterIndex()`
`protected int`
`toArrayIndex(int parameterIndex)`

### Methods inherited from class com.clickhouse.jdbc.internal.ClickHouseStatementImpl

`cancel, clearBatch, clearWarnings, close, closeOnCompletion, ensureOpen, executeBatch, executeInsert, executeStatement, executeStatement, getConfig, getConnection, getDataProcessor, getDataProcessor, getFetchDirection, getFetchSize, getFile, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getLastStatement, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getNullAsDefault, getQueryTimeout, getRequest, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, newEmptyResultSet, optionChanged, parseSqlStatements, processSqlStatement, resetDataProcessor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setLastStatement, setMaxFieldSize, setMaxRows, setNullAsDefault, setPoolable, setQueryTimeout, settingChanged, unwrap, updateResult`

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

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

### Methods inherited from interface com.clickhouse.config.ClickHouseConfigChangeListener

`propertyChanged`

### Methods inherited from interface com.clickhouse.jdbc.ClickHouseStatement

`write`

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

`addBatch, clearParameters, execute, executeLargeUpdate, executeQuery, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL`

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

`cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeBatch, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout`

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

`isWrapperFor, unwrap`

## Constructor Details

### AbstractPreparedStatement

protected AbstractPreparedStatement(ClickHouseConnectionImpl connection, com.clickhouse.client.ClickHouseRequest<?> request, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

Throws:
  `SQLException`

## Method Details

### executeAny

protected abstract long[] executeAny(boolean asBatch) throws SQLException

Throws:
  `SQLException`

### getMaxParameterIndex

protected abstract int getMaxParameterIndex()

### toArrayIndex

protected int toArrayIndex(int parameterIndex) throws SQLException

Throws:
  `SQLException`

### addBatch

public final void addBatch(String sql) throws SQLException

Specified by:
  `addBatch` in interface `Statement`
Overrides:
  `addBatch` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### execute

public final boolean execute(String sql) throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### execute

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

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### execute

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

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### execute

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

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeLargeBatch

public long[] executeLargeBatch() throws SQLException

Specified by:
  `executeLargeBatch` in interface `Statement`
Overrides:
  `executeLargeBatch` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeLargeUpdate

public final long executeLargeUpdate(String sql) throws SQLException

Specified by:
  `executeLargeUpdate` in interface `Statement`
Overrides:
  `executeLargeUpdate` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeLargeUpdate

public final long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException

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

### executeLargeUpdate

public final long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException

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

### executeLargeUpdate

public final long executeLargeUpdate(String sql, String[] columnNames) throws SQLException

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

### executeQuery

public final ResultSet executeQuery(String sql) throws SQLException

Specified by:
  `executeQuery` in interface `Statement`
Overrides:
  `executeQuery` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeUpdate

public final int executeUpdate() throws SQLException

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

### executeUpdate

public final int executeUpdate(String sql) throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeUpdate

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

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeUpdate

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

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`

### executeUpdate

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

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `ClickHouseStatementImpl`
Throws:
  `SQLException`