Top Description Fields Methods
com.mysql.cj.jdbc

public Interface JdbcStatement

extends Statement, Query
Known Direct Subinterfaces
com.mysql.cj.jdbc.JdbcPreparedStatement
Known Direct Implementers
com.mysql.cj.jdbc.StatementImpl
Imports
java.io.InputStream, java.sql.SQLException, com.mysql.cj.PingTarget, .Query, com.mysql.cj.exceptions.ExceptionInterceptor, com.mysql.cj.jdbc.result.ResultSetInternalMethods

This interface contains methods that are considered the "vendor extension" to the JDBC API for MySQL's implementation of java.sql.Statement. For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to StatementImpl throughout the code).

Field Summary

Modifier and TypeField and Description
public static final int
Inherited from java.sql.Statement:
CLOSE_ALL_RESULTSCLOSE_CURRENT_RESULTEXECUTE_FAILEDKEEP_CURRENT_RESULTNO_GENERATED_KEYSRETURN_GENERATED_KEYSSUCCESS_NO_INFO

Method Summary

Modifier and TypeMethod and Description
public void
public void
disableStreamingResults()

Resets this statements fetch size and result set type to the values they had before enableStreamingResults() was called.

public void
doClose(CloseOption...
options indicating how the close was initiated and/or what should be performed during the close
options
)

Closes this Statement and release resources.

public void
enableStreamingResults()

Workaround for containers that 'check' for sane values of Statement.setFetchSize() so that applications can use the Java variant of libmysql's mysql_use_result() behavior.

public ExceptionInterceptor
public InputStream

Returns:

input stream
getLocalInfileInputStream
()

Returns the InputStream instance that will be used to send data in response to a "LOAD DATA LOCAL INFILE" statement.

public int

Returns:

the number of open result sets for this statement
getOpenResultSetCount
()

Returns the number of open result sets for this statement.

public Query
public ResultSetInternalMethods
public void
notifyResultSetClose(ResultSetInternalMethods
The ResultSet being closed
rs
)

Callback for ResultSet instances to notify the owning Statement when they are being closed.

public void
setAttribute(String name, Object value)

public void
setHoldResultsOpenOverClose(boolean holdResultsOpenOverClose)

public void
setLocalInfileInputStream(InputStream
input stream
stream
)

Sets an InputStream instance that will be used to send data to the MySQL server for a "LOAD DATA LOCAL INFILE" statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement.

public void
Inherited from com.mysql.cj.Query:
addBatchcheckCancelTimeoutclearBatchedArgscloseQuerygetBatchedArgsgetCancelTimeoutLockgetCurrentDatabasegetExecuteTimegetIdgetQueryAttributesBindingsgetResultFetchSizegetResultSetFactorygetResultTypegetSessiongetStatementExecutinggetTimeoutInMillisisClearWarningsCalledresetCancelledStatesetCancelStatussetClearWarningsCalledsetCurrentDatabasesetExecuteTimesetResultFetchSizesetResultTypesetTimeoutInMillisstartQueryTimerstatementBeginsstopQueryTimer
Inherited from java.sql.Statement:
addBatchcancelclearBatchclearWarningsclosecloseOnCompletionenquoteIdentifierenquoteLiteralenquoteNCharLiteralexecuteexecuteexecuteexecuteexecuteBatchexecuteLargeBatchexecuteLargeUpdateexecuteLargeUpdateexecuteLargeUpdateexecuteLargeUpdateexecuteQueryexecuteUpdateexecuteUpdateexecuteUpdateexecuteUpdategetConnectiongetFetchDirectiongetFetchSizegetGeneratedKeysgetLargeMaxRowsgetLargeUpdateCountgetMaxFieldSizegetMaxRowsgetMoreResultsgetMoreResultsgetQueryTimeoutgetResultSetgetResultSetConcurrencygetResultSetHoldabilitygetResultSetTypegetUpdateCountgetWarningsisClosedisCloseOnCompletionisPoolableisSimpleIdentifiersetCursorNamesetEscapeProcessingsetFetchDirectionsetFetchSizesetLargeMaxRowssetMaxFieldSizesetMaxRowssetPoolablesetQueryTimeout

Field Detail

MAX_ROWSback to summary
public static final int MAX_ROWS

Method Detail

clearAttributesback to summary
public void clearAttributes()
disableStreamingResultsback to summary
public void disableStreamingResults() throws SQLException

Resets this statements fetch size and result set type to the values they had before enableStreamingResults() was called.

Exceptions
SQLException:
if an error occurs
doCloseback to summary
public void doClose(CloseOption... options) throws SQLException

Closes this Statement and release resources.

Parameters
options:CloseOption[]

options indicating how the close was initiated and/or what should be performed during the close

Exceptions
SQLException:
if an error occurs
enableStreamingResultsback to summary
public void enableStreamingResults() throws SQLException

Workaround for containers that 'check' for sane values of Statement.setFetchSize() so that applications can use the Java variant of libmysql's mysql_use_result() behavior.

Exceptions
SQLException:
if an error occurs
getExceptionInterceptorback to summary
public ExceptionInterceptor getExceptionInterceptor()
getLocalInfileInputStreamback to summary
public InputStream getLocalInfileInputStream()

Returns the InputStream instance that will be used to send data in response to a "LOAD DATA LOCAL INFILE" statement. This method returns NULL if no such stream has been set via setLocalInfileInputStream().

Returns:InputStream

input stream

getOpenResultSetCountback to summary
public int getOpenResultSetCount()

Returns the number of open result sets for this statement.

Returns:int

the number of open result sets for this statement

getQueryback to summary
public Query getQuery()
getResultSetInternalback to summary
public ResultSetInternalMethods getResultSetInternal()
notifyResultSetCloseback to summary
public void notifyResultSetClose(ResultSetInternalMethods rs)

Callback for ResultSet instances to notify the owning Statement when they are being closed.

Parameters
rs:ResultSetInternalMethods

The ResultSet being closed

setAttributeback to summary
public void setAttribute(String name, Object value)
setHoldResultsOpenOverCloseback to summary
public void setHoldResultsOpenOverClose(boolean holdResultsOpenOverClose)
setLocalInfileInputStreamback to summary
public void setLocalInfileInputStream(InputStream stream)

Sets an InputStream instance that will be used to send data to the MySQL server for a "LOAD DATA LOCAL INFILE" statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement. This stream will be read to completion upon execution of a "LOAD DATA LOCAL INFILE" statement, and will automatically be closed by the driver, so it needs to be reset before each call to execute*() that would cause the MySQL server to request data to fulfill the request for "LOAD DATA LOCAL INFILE". If this value is set to NULL, the driver will revert to using a FileInputStream or URLInputStream as required.

Parameters
stream:InputStream

input stream

setPingTargetback to summary
public void setPingTarget(PingTarget pingTarget)