Class PgStatement
- java.lang.Object
-
- org.postgresql.jdbc.PgStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.Statement,java.sql.Wrapper,BaseStatement,PGStatement
- Direct Known Subclasses:
PgPreparedStatement
public class PgStatement extends java.lang.Object implements java.sql.Statement, BaseStatement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPgStatement.StatementResultHandlerResultHandler implementations for updates, queries, and either-or.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<ParameterList>batchParametersprotected java.util.ArrayList<Query>batchStatementsprivate static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<PgStatement,java.util.TimerTask>CANCEL_TIMER_UPDATERprivate java.util.TimerTaskcancelTimerTaskProtects current statement from cancelTask starting, waiting for a bit, and waking up exactly on subsequent query execution.private booleancloseOnCompletionprotected intconcurrencyprotected BaseConnectionconnectionprivate static booleanDEFAULT_FORCE_BINARY_TRANSFERSDefault state for use or not binary transfers.protected intfetchdirectionprotected intfetchSizeNumber of rows to get in a batch.protected ResultWrapperfirstUnclosedResultThe first unclosed result.private booleanforceBinaryTransfersprotected ResultWrappergeneratedKeysResults returned by a statement that wants generated keys.private booleanisClosedprotected intmaxFieldSizeprotected intmaxrowsMaximum number of rows to return, 0 = unlimited.protected intmPrepareThresholdprivate static java.lang.String[]NO_RETURNING_COLUMNSprivate booleanpoolableprotected booleanreplaceProcessingEnabledprotected ResultWrapperresultThe current results.protected intresultsettypeprivate intrsHoldabilityprivate static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<PgStatement,StatementCancelState>STATE_UPDATERprivate StatementCancelStatestatementStateProtects statement from out-of-order cancels.protected longtimeoutTimeout (in milliseconds) for a query.booleanwantsGeneratedKeysAlwaysWas this PreparedStatement created to return generated keys for every execution? This is set at creation time and never cleared by execution.protected booleanwantsGeneratedKeysOnceDoes the caller of execute/executeUpdate want generated keys for this execution? This is set by Statement methods that have generated keys arguments and cleared after execution is complete.protected PSQLWarningWrapperwarningsThe warnings chain.-
Fields inherited from interface org.postgresql.PGStatement
DATE_NEGATIVE_INFINITY, DATE_NEGATIVE_SMALLER_INFINITY, DATE_POSITIVE_INFINITY, DATE_POSITIVE_SMALLER_INFINITY
-
-
Constructor Summary
Constructors Constructor Description PgStatement(PgConnection c, int rsType, int rsConcurrency, int rsHoldability)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBatch(java.lang.String sql)voidaddWarning(java.sql.SQLWarning warn)Either initializes new warning wrapper, or adds warning onto the chain.voidcancel()protected voidcheckClosed()protected voidcheckCompletion()protected voidcheckNoResultUpdate()private booleancleanupTimer()ClearscancelTimerTaskif any.voidclearBatch()voidclearWarnings()Clears the warning chain.voidclose()Note: even thoughStatementis automatically closed when it is garbage collected, it is better to close it explicitly to lower resource consumption.protected voidcloseForNextExecution()protected voidcloseImpl()This is guaranteed to be called exactly once even in case of concurrentclose()calls.voidcloseOnCompletion()private voidcloseUnclosedResults()protected BatchResultHandlercreateBatchHandler(Query[] queries, ParameterList[] parameterLists)java.sql.ResultSetcreateDriverResultSet(Field[] fields, java.util.List<Tuple> tuples)Create a synthetic resultset from data provided by the driver.java.sql.ResultSetcreateResultSet(Query originalQuery, Field[] fields, java.util.List<Tuple> tuples, ResultCursor cursor)Create a resultset from data retrieved from the server.booleanexecute(java.lang.String sql)booleanexecute(java.lang.String sql, int autoGeneratedKeys)booleanexecute(java.lang.String sql, int[] columnIndexes)booleanexecute(java.lang.String sql, java.lang.String[] columnNames)protected voidexecute(CachedQuery cachedQuery, ParameterList queryParameters, int flags)int[]executeBatch()private booleanexecuteCachedSql(java.lang.String sql, int flags, java.lang.String[] columnNames)private voidexecuteInternal(CachedQuery cachedQuery, ParameterList queryParameters, int flags)long[]executeLargeBatch()longexecuteLargeUpdate(java.lang.String sql)longexecuteLargeUpdate(java.lang.String sql, int autoGeneratedKeys)longexecuteLargeUpdate(java.lang.String sql, int[] columnIndexes)longexecuteLargeUpdate(java.lang.String sql, java.lang.String[] columnNames)java.sql.ResultSetexecuteQuery(java.lang.String sql)intexecuteUpdate(java.lang.String sql)intexecuteUpdate(java.lang.String sql, int autoGeneratedKeys)intexecuteUpdate(java.lang.String sql, int[] columnIndexes)intexecuteUpdate(java.lang.String sql, java.lang.String[] columnNames)booleanexecuteWithFlags(int flags)Execute a prepared query, passing additional query flags.booleanexecuteWithFlags(java.lang.String sql, int flags)Execute a query, passing additional query flags.booleanexecuteWithFlags(CachedQuery simpleQuery, int flags)Execute a query, passing additional query flags.java.sql.ConnectiongetConnection()intgetFetchDirection()java.lang.StringgetFetchingCursorName()intgetFetchSize()protected booleangetForceBinaryTransfer()java.sql.ResultSetgetGeneratedKeys()longgetLargeMaxRows()longgetLargeUpdateCount()longgetLastOID()Returns the Last inserted/updated oid.intgetMaxFieldSize()intgetMaxRows()booleangetMoreResults()booleangetMoreResults(int current)BaseConnectiongetPGConnection()intgetPrepareThreshold()Gets the server-side prepare reuse threshold in use for this statement.intgetQueryTimeout()longgetQueryTimeoutMs()The queryTimeout limit is the number of milliseconds the driver will wait for a Statement to execute.java.sql.ResultSetgetResultSet()intgetResultSetConcurrency()intgetResultSetHoldability()intgetResultSetType()protected java.sql.ResultSetgetSingleResultSet()intgetUpdateCount()java.sql.SQLWarninggetWarnings()private BatchResultHandlerinternalExecuteBatch()booleanisClosed()booleanisCloseOnCompletion()protected booleanisOneShotQuery(CachedQuery cachedQuery)Returns true if query is unlikely to be reused.booleanisPoolable()booleanisUseServerPrepare()Checks if this statement will be executed as a server-prepared statement.booleanisWrapperFor(java.lang.Class<?> iface)private voidkillTimerTask()voidsetCursorName(java.lang.String name)voidsetEscapeProcessing(boolean enable)voidsetFetchDirection(int direction)voidsetFetchSize(int rows)voidsetLargeMaxRows(long max)voidsetMaxFieldSize(int max)voidsetMaxRows(int max)voidsetPoolable(boolean poolable)voidsetPrepareThreshold(int newThreshold)Sets the reuse threshold for using server-prepared statements.voidsetQueryTimeout(int seconds)voidsetQueryTimeoutMs(long millis)Sets the queryTimeout limit.voidsetUseServerPrepare(boolean flag)Turn on the use of prepared statements in the server (server side prepared statements are unrelated to jdbc PreparedStatements) As of build 302, this method is equivalent tosetPrepareThreshold(1).private voidstartTimer()protected voidtransformQueriesAndParameters()<T> Tunwrap(java.lang.Class<T> iface)protected booleanwantsHoldableResultSet()protected booleanwantsScrollableResultSet()
-
-
-
Field Detail
-
NO_RETURNING_COLUMNS
private static final java.lang.String[] NO_RETURNING_COLUMNS
-
DEFAULT_FORCE_BINARY_TRANSFERS
private static final boolean DEFAULT_FORCE_BINARY_TRANSFERS
Default state for use or not binary transfers. Can use only for testing purposes
-
forceBinaryTransfers
private boolean forceBinaryTransfers
-
batchStatements
protected java.util.ArrayList<Query> batchStatements
-
batchParameters
protected java.util.ArrayList<ParameterList> batchParameters
-
resultsettype
protected final int resultsettype
-
concurrency
protected final int concurrency
-
rsHoldability
private final int rsHoldability
-
poolable
private boolean poolable
-
closeOnCompletion
private boolean closeOnCompletion
-
fetchdirection
protected int fetchdirection
-
cancelTimerTask
private volatile java.util.TimerTask cancelTimerTask
Protects current statement from cancelTask starting, waiting for a bit, and waking up exactly on subsequent query execution. The idea is to atomically compare and swap the reference to the task, so the task can detect that statement executes different query than the one the cancelTask was created. Note: the field must be set/get/compareAndSet viaCANCEL_TIMER_UPDATERas perAtomicReferenceFieldUpdaterjavadoc.
-
CANCEL_TIMER_UPDATER
private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<PgStatement,java.util.TimerTask> CANCEL_TIMER_UPDATER
-
statementState
private volatile StatementCancelState statementState
Protects statement from out-of-order cancels. It protects from bothsetQueryTimeout(int)andcancel()induced ones.execute(String)and friends change the field toStatementCancelState.IN_QUERYduring execute.cancel()ignores cancel request if state isStatementCancelState.IDLE. In caseexecute(String)observes non-StatementCancelState.IDLEstate as it completes the query, it waits tillStatementCancelState.CANCELLED. Note: the field must be set/get/compareAndSet viaSTATE_UPDATERas perAtomicIntegerFieldUpdaterjavadoc.
-
STATE_UPDATER
private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<PgStatement,StatementCancelState> STATE_UPDATER
-
wantsGeneratedKeysOnce
protected boolean wantsGeneratedKeysOnce
Does the caller of execute/executeUpdate want generated keys for this execution? This is set by Statement methods that have generated keys arguments and cleared after execution is complete.
-
wantsGeneratedKeysAlways
public boolean wantsGeneratedKeysAlways
Was this PreparedStatement created to return generated keys for every execution? This is set at creation time and never cleared by execution.
-
connection
protected final BaseConnection connection
-
warnings
protected volatile PSQLWarningWrapper warnings
The warnings chain.
-
maxrows
protected int maxrows
Maximum number of rows to return, 0 = unlimited.
-
fetchSize
protected int fetchSize
Number of rows to get in a batch.
-
timeout
protected long timeout
Timeout (in milliseconds) for a query.
-
replaceProcessingEnabled
protected boolean replaceProcessingEnabled
-
result
protected ResultWrapper result
The current results.
-
firstUnclosedResult
protected ResultWrapper firstUnclosedResult
The first unclosed result.
-
generatedKeys
protected ResultWrapper generatedKeys
Results returned by a statement that wants generated keys.
-
mPrepareThreshold
protected int mPrepareThreshold
-
maxFieldSize
protected int maxFieldSize
-
isClosed
private volatile boolean isClosed
-
-
Constructor Detail
-
PgStatement
PgStatement(PgConnection c, int rsType, int rsConcurrency, int rsHoldability) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
createResultSet
public java.sql.ResultSet createResultSet(Query originalQuery, Field[] fields, java.util.List<Tuple> tuples, ResultCursor cursor) throws java.sql.SQLException
Description copied from interface:BaseStatementCreate a resultset from data retrieved from the server.- Specified by:
createResultSetin interfaceBaseStatement- Parameters:
originalQuery- the query that generated this resultset; used when dealing with updateable resultsetsfields- the column metadata for the resultsettuples- the resultset datacursor- the cursor to use to retrieve more data from the server; if null, no additional data is present.- Returns:
- the new ResultSet
- Throws:
java.sql.SQLException- if something goes wrong
-
getPGConnection
public BaseConnection getPGConnection()
-
getFetchingCursorName
public java.lang.String getFetchingCursorName()
-
getFetchSize
public int getFetchSize()
- Specified by:
getFetchSizein interfacejava.sql.Statement
-
wantsScrollableResultSet
protected boolean wantsScrollableResultSet()
-
wantsHoldableResultSet
protected boolean wantsHoldableResultSet()
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeQueryin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getSingleResultSet
protected java.sql.ResultSet getSingleResultSet() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
checkNoResultUpdate
protected final void checkNoResultUpdate() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeWithFlags
public boolean executeWithFlags(java.lang.String sql, int flags) throws java.sql.SQLExceptionDescription copied from interface:BaseStatementExecute a query, passing additional query flags.- Specified by:
executeWithFlagsin interfaceBaseStatement- Parameters:
sql- the query to execute (JDBC-style query)flags- additionalQueryExecutorflags for execution; these are bitwise-ORed into the default flags.- Returns:
- true if there is a result set
- Throws:
java.sql.SQLException- if something goes wrong.
-
executeCachedSql
private boolean executeCachedSql(java.lang.String sql, int flags, java.lang.String[] columnNames) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeWithFlags
public boolean executeWithFlags(CachedQuery simpleQuery, int flags) throws java.sql.SQLException
Description copied from interface:BaseStatementExecute a query, passing additional query flags.- Specified by:
executeWithFlagsin interfaceBaseStatement- Parameters:
simpleQuery- the query to execute (native to PostgreSQL)flags- additionalQueryExecutorflags for execution; these are bitwise-ORed into the default flags.- Returns:
- true if there is a result set
- Throws:
java.sql.SQLException- if something goes wrong.
-
executeWithFlags
public boolean executeWithFlags(int flags) throws java.sql.SQLExceptionDescription copied from interface:BaseStatementExecute a prepared query, passing additional query flags.- Specified by:
executeWithFlagsin interfaceBaseStatement- Parameters:
flags- additionalQueryExecutorflags for execution; these are bitwise-ORed into the default flags.- Returns:
- true if there is a result set
- Throws:
java.sql.SQLException- if something goes wrong.
-
closeUnclosedResults
private void closeUnclosedResults() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
closeForNextExecution
protected void closeForNextExecution() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
isOneShotQuery
protected boolean isOneShotQuery(CachedQuery cachedQuery)
Returns true if query is unlikely to be reused.- Parameters:
cachedQuery- to check (null if current query)- Returns:
- true if query is unlikely to be reused
-
execute
protected final void execute(CachedQuery cachedQuery, ParameterList queryParameters, int flags) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeInternal
private void executeInternal(CachedQuery cachedQuery, ParameterList queryParameters, int flags) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
setCursorName
public void setCursorName(java.lang.String name) throws java.sql.SQLException- Specified by:
setCursorNamein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getUpdateCount
public int getUpdateCount() throws java.sql.SQLException- Specified by:
getUpdateCountin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getMoreResults
public boolean getMoreResults() throws java.sql.SQLException- Specified by:
getMoreResultsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getMaxRows
public int getMaxRows() throws java.sql.SQLException- Specified by:
getMaxRowsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setMaxRows
public void setMaxRows(int max) throws java.sql.SQLException- Specified by:
setMaxRowsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException- Specified by:
setEscapeProcessingin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getQueryTimeout
public int getQueryTimeout() throws java.sql.SQLException- Specified by:
getQueryTimeoutin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setQueryTimeout
public void setQueryTimeout(int seconds) throws java.sql.SQLException- Specified by:
setQueryTimeoutin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getQueryTimeoutMs
public long getQueryTimeoutMs() throws java.sql.SQLExceptionThe queryTimeout limit is the number of milliseconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.- Returns:
- the current query timeout limit in milliseconds; 0 = unlimited
- Throws:
java.sql.SQLException- if a database access error occurs
-
setQueryTimeoutMs
public void setQueryTimeoutMs(long millis) throws java.sql.SQLExceptionSets the queryTimeout limit.- Parameters:
millis- - the new query timeout limit in milliseconds- Throws:
java.sql.SQLException- if a database access error occurs
-
addWarning
public void addWarning(java.sql.SQLWarning warn)
Either initializes new warning wrapper, or adds warning onto the chain.
Although warnings are expected to be added sequentially, the warnings chain may be cleared concurrently at any time via
clearWarnings(), therefore it is possible that a warning added via this method is placed onto the end of the previous warning chain- Parameters:
warn- warning to add
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException- Specified by:
getWarningsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getMaxFieldSize
public int getMaxFieldSize() throws java.sql.SQLException- Specified by:
getMaxFieldSizein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setMaxFieldSize
public void setMaxFieldSize(int max) throws java.sql.SQLException- Specified by:
setMaxFieldSizein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
clearWarnings
public void clearWarnings() throws java.sql.SQLExceptionClears the warning chain.
Note that while it is safe to clear warnings while the query is executing, warnings that are added between calls to
getWarnings()and #clearWarnings() may be missed. Therefore you should hold a reference to the tail of the previous warning chain and verify if itsSQLWarning.getNextWarning()value is holds any new value.- Specified by:
clearWarningsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getResultSet
public java.sql.ResultSet getResultSet() throws java.sql.SQLException- Specified by:
getResultSetin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
close
public final void close() throws java.sql.SQLExceptionNote: even thoughStatementis automatically closed when it is garbage collected, it is better to close it explicitly to lower resource consumption.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
closeImpl
protected void closeImpl() throws java.sql.SQLExceptionThis is guaranteed to be called exactly once even in case of concurrentclose()calls.- Throws:
java.sql.SQLException- in case of error
-
getLastOID
public long getLastOID() throws java.sql.SQLExceptionDescription copied from interface:PGStatementReturns the Last inserted/updated oid.- Specified by:
getLastOIDin interfacePGStatement- Returns:
- OID of last insert
- Throws:
java.sql.SQLException- if something goes wrong
-
setPrepareThreshold
public void setPrepareThreshold(int newThreshold) throws java.sql.SQLExceptionDescription copied from interface:PGStatementSets the reuse threshold for using server-prepared statements.
If
thresholdis a non-zero value N, the Nth and subsequent reuses of a PreparedStatement will use server-side prepare.If
thresholdis zero, server-side prepare will not be used.The reuse threshold is only used by PreparedStatement and CallableStatement objects; it is ignored for plain Statements.
- Specified by:
setPrepareThresholdin interfacePGStatement- Parameters:
newThreshold- the new threshold for this statement- Throws:
java.sql.SQLException- if an exception occurs while changing the threshold
-
getPrepareThreshold
public int getPrepareThreshold()
Description copied from interface:PGStatementGets the server-side prepare reuse threshold in use for this statement.- Specified by:
getPrepareThresholdin interfacePGStatement- Returns:
- the current threshold
- See Also:
PGStatement.setPrepareThreshold(int)
-
setUseServerPrepare
public void setUseServerPrepare(boolean flag) throws java.sql.SQLExceptionDescription copied from interface:PGStatementTurn on the use of prepared statements in the server (server side prepared statements are unrelated to jdbc PreparedStatements) As of build 302, this method is equivalent tosetPrepareThreshold(1).- Specified by:
setUseServerPreparein interfacePGStatement- Parameters:
flag- use server prepare- Throws:
java.sql.SQLException- if something goes wrong
-
isUseServerPrepare
public boolean isUseServerPrepare()
Description copied from interface:PGStatementChecks if this statement will be executed as a server-prepared statement. A return value oftrueindicates that the next execution of the statement will be done as a server-prepared statement, assuming the underlying protocol supports it.- Specified by:
isUseServerPreparein interfacePGStatement- Returns:
- true if the next reuse of this statement will use a server-prepared statement
-
checkClosed
protected void checkClosed() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
clearBatch
public void clearBatch() throws java.sql.SQLException- Specified by:
clearBatchin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
createBatchHandler
protected BatchResultHandler createBatchHandler(Query[] queries, ParameterList[] parameterLists)
-
internalExecuteBatch
private BatchResultHandler internalExecuteBatch() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException- Specified by:
executeBatchin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
cancel
public void cancel() throws java.sql.SQLException- Specified by:
cancelin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
getConnectionin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getFetchDirection
public int getFetchDirection()
- Specified by:
getFetchDirectionin interfacejava.sql.Statement
-
getResultSetConcurrency
public int getResultSetConcurrency()
- Specified by:
getResultSetConcurrencyin interfacejava.sql.Statement
-
getResultSetType
public int getResultSetType()
- Specified by:
getResultSetTypein interfacejava.sql.Statement
-
setFetchDirection
public void setFetchDirection(int direction) throws java.sql.SQLException- Specified by:
setFetchDirectionin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setFetchSize
public void setFetchSize(int rows) throws java.sql.SQLException- Specified by:
setFetchSizein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
startTimer
private void startTimer()
-
cleanupTimer
private boolean cleanupTimer()
ClearscancelTimerTaskif any. Returns true if and only if "cancel" timer task would never invokecancel().
-
killTimerTask
private void killTimerTask()
-
getForceBinaryTransfer
protected boolean getForceBinaryTransfer()
-
getLargeUpdateCount
public long getLargeUpdateCount() throws java.sql.SQLException- Specified by:
getLargeUpdateCountin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setLargeMaxRows
public void setLargeMaxRows(long max) throws java.sql.SQLException- Specified by:
setLargeMaxRowsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getLargeMaxRows
public long getLargeMaxRows() throws java.sql.SQLException- Specified by:
getLargeMaxRowsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws java.sql.SQLException- Specified by:
executeLargeBatchin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
isClosed
public boolean isClosed() throws java.sql.SQLException- Specified by:
isClosedin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
setPoolable
public void setPoolable(boolean poolable) throws java.sql.SQLException- Specified by:
setPoolablein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
isPoolable
public boolean isPoolable() throws java.sql.SQLException- Specified by:
isPoolablein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
closeOnCompletion
public void closeOnCompletion() throws java.sql.SQLException- Specified by:
closeOnCompletionin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
isCloseOnCompletion
public boolean isCloseOnCompletion() throws java.sql.SQLException- Specified by:
isCloseOnCompletionin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
checkCompletion
protected void checkCompletion() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getMoreResults
public boolean getMoreResults(int current) throws java.sql.SQLException- Specified by:
getMoreResultsin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException- Specified by:
getGeneratedKeysin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
getResultSetHoldability
public int getResultSetHoldability() throws java.sql.SQLException- Specified by:
getResultSetHoldabilityin interfacejava.sql.Statement- Throws:
java.sql.SQLException
-
createDriverResultSet
public java.sql.ResultSet createDriverResultSet(Field[] fields, java.util.List<Tuple> tuples) throws java.sql.SQLException
Description copied from interface:BaseStatementCreate a synthetic resultset from data provided by the driver.- Specified by:
createDriverResultSetin interfaceBaseStatement- Parameters:
fields- the column metadata for the resultsettuples- the resultset data- Returns:
- the new ResultSet
- Throws:
java.sql.SQLException- if something goes wrong
-
transformQueriesAndParameters
protected void transformQueriesAndParameters() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-