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:
ClickHouseStatement,AutoCloseable,PreparedStatement,Statement,Wrapper
- Direct Known Subclasses:
InputBasedPreparedStatement,SqlBasedPreparedStatement,TableBasedPreparedStatement
public abstract class AbstractPreparedStatement extends ClickHouseStatementImpl implements PreparedStatement
-
-
Field Summary
-
Fields inherited from class com.clickhouse.jdbc.internal.ClickHouseStatementImpl
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 protectedAbstractPreparedStatement(ClickHouseConnectionImpl connection, ClickHouseRequest<?> request, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBatch(String sql)booleanexecute(String sql)booleanexecute(String sql, int autoGeneratedKeys)booleanexecute(String sql, int[] columnIndexes)booleanexecute(String sql, String[] columnNames)protected abstract long[]executeAny(boolean asBatch)long[]executeLargeBatch()longexecuteLargeUpdate(String sql)longexecuteLargeUpdate(String sql, int autoGeneratedKeys)longexecuteLargeUpdate(String sql, int[] columnIndexes)longexecuteLargeUpdate(String sql, String[] columnNames)ResultSetexecuteQuery(String sql)intexecuteUpdate()intexecuteUpdate(String sql)intexecuteUpdate(String sql, int autoGeneratedKeys)intexecuteUpdate(String sql, int[] columnIndexes)intexecuteUpdate(String sql, String[] columnNames)protected abstract intgetMaxParameterIndex()protected inttoArrayIndex(int parameterIndex)-
Methods inherited from class com.clickhouse.jdbc.internal.ClickHouseStatementImpl
cancel, clearBatch, clearWarnings, close, closeOnCompletion, ensureOpen, executeBatch, executeInsert, executeStatement, executeStatement, getConfig, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getLastStatement, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getRequest, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, newEmptyResultSet, parseSqlStatements, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setLastStatement, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, 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.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 Detail
-
AbstractPreparedStatement
protected AbstractPreparedStatement(ClickHouseConnectionImpl connection, ClickHouseRequest<?> request, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
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:
addBatchin interfaceStatement- Overrides:
addBatchin classClickHouseStatementImpl- Throws:
SQLException
-
execute
public final boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classClickHouseStatementImpl- Throws:
SQLException
-
execute
public final boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classClickHouseStatementImpl- Throws:
SQLException
-
execute
public final boolean execute(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classClickHouseStatementImpl- Throws:
SQLException
-
execute
public final boolean execute(String sql, String[] columnNames) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classClickHouseStatementImpl- Throws:
SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classClickHouseStatementImpl- Throws:
SQLException
-
executeLargeUpdate
public final long executeLargeUpdate(String sql) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classClickHouseStatementImpl- Throws:
SQLException
-
executeLargeUpdate
public final long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
public final long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
public final long executeLargeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeQuery
public final ResultSet executeQuery(String sql) throws SQLException
- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classClickHouseStatementImpl- Throws:
SQLException
-
executeUpdate
public final int executeUpdate() throws SQLException- Specified by:
executeUpdatein interfacePreparedStatement- Throws:
SQLException
-
executeUpdate
public final int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classClickHouseStatementImpl- Throws:
SQLException
-
executeUpdate
public final int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classClickHouseStatementImpl- Throws:
SQLException
-
executeUpdate
public final int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classClickHouseStatementImpl- Throws:
SQLException
-
executeUpdate
public final int executeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classClickHouseStatementImpl- Throws:
SQLException
-
-