Top Fields Constructors Methods
org.jooq.impl

pack-priv final Class DiagnosticsStatement

extends DefaultCallableStatement
Class Inheritance
Imports
java.sql.Connection, .ResultSet, .SQLException, .Statement, org.jooq.tools.jdbc.DefaultCallableStatement

Deprecated

as a consequence of DefaultCallableStatement being deprecated. See corresponding docs for further information.

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final DiagnosticsConnection
connection

Deprecated as a consequence of DiagnosticsConnection being deprecated.

Constructor Summary

AccessConstructor and Description
pack-priv
DiagnosticsStatement(DiagnosticsConnection connection, Statement statement)

Deprecated as a consequence of DiagnosticsConnection being deprecated.
pack-priv
DiagnosticsStatement(DiagnosticsConnection connection, Statement statement, String actualStatement)

Deprecated as a consequence of DiagnosticsConnection being deprecated.

Method Summary

Modifier and TypeMethod and Description
public final void
addBatch(String
typically this is a SQL INSERT or UPDATE statement
sql
)

Overrides org.jooq.tools.jdbc.DefaultStatement.addBatch.

Implements java.sql.Statement.addBatch.

Adds the given SQL command to the current list of commands for this Statement object.
public final boolean
execute(String
any SQL statement
sql
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results.
public final boolean
execute(String
any SQL statement
sql
,
int
a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
public final boolean
execute(String
any SQL statement
sql
,
int[]
an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final boolean
execute(String
any SQL statement
sql
,
String[]
an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
public final long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
int
a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
public final long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
int[]
an array of column indexes indicating the columns that should be returned from the inserted row
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
String[]
an array of the names of the columns that should be returned from the inserted row
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final ResultSet
executeQuery(String
an SQL statement to be sent to the database, typically a static SQL SELECT statement
sql
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeQuery.

Implements java.sql.Statement.executeQuery.

Executes the given SQL statement, which returns a single ResultSet object.
public ResultSet
executeQuery()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.executeQuery.

Implements java.sql.PreparedStatement.executeQuery.

Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
public final int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
public final int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
int
a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
public final int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
int[]
an array of column indexes indicating the columns that should be returned from the inserted row
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
sql
,
String[]
an array of the names of the columns that should be returned from the inserted row
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public final Connection
getConnection()

Overrides org.jooq.tools.jdbc.DefaultStatement.getConnection.

Implements java.sql.Statement.getConnection.

Retrieves the Connection object that produced this Statement object.
Inherited from org.jooq.tools.jdbc.DefaultCallableStatement:
getArraygetArraygetBigDecimalgetBigDecimalgetBigDecimalgetBlobgetBlobgetBooleangetBooleangetBytegetBytegetBytesgetBytesgetCharacterStreamgetCharacterStreamgetClobgetClobgetDategetDategetDategetDategetDelegategetDelegateCallableStatementgetDoublegetDoublegetFloatgetFloatgetIntgetIntgetLonggetLonggetNCharacterStreamgetNCharacterStreamgetNClobgetNClobgetNStringgetNStringgetObjectgetObjectgetObjectgetObjectgetObjectgetObjectgetRefgetRefgetRowIdgetRowIdgetShortgetShortgetSQLXMLgetSQLXMLgetStringgetStringgetTimegetTimegetTimegetTimegetTimestampgetTimestampgetTimestampgetTimestampgetURLgetURLregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParameterregisterOutParametersetAsciiStreamsetAsciiStreamsetAsciiStreamsetBigDecimalsetBinaryStreamsetBinaryStreamsetBinaryStreamsetBlobsetBlobsetBlobsetBooleansetBytesetBytessetCharacterStreamsetCharacterStreamsetCharacterStreamsetClobsetClobsetClobsetDatesetDatesetDoublesetFloatsetIntsetLongsetNCharacterStreamsetNCharacterStreamsetNClobsetNClobsetNClobsetNStringsetNullsetNullsetObjectsetObjectsetObjectsetObjectsetObjectsetRowIdsetShortsetSQLXMLsetStringsetTimesetTimesetTimestampsetTimestampsetURLwasNull

Field Detail

actualStatementback to summary
pack-priv final String actualStatement
connectionback to summary
pack-priv final DiagnosticsConnection connection

Deprecated

as a consequence of DiagnosticsConnection being deprecated. See corresponding docs for further information.

Constructor Detail

DiagnosticsStatementback to summary
pack-priv DiagnosticsStatement(DiagnosticsConnection connection, Statement statement)

Deprecated

as a consequence of DiagnosticsConnection being deprecated. See corresponding docs for further information.

DiagnosticsStatementback to summary
pack-priv DiagnosticsStatement(DiagnosticsConnection connection, Statement statement, String actualStatement)

Deprecated

as a consequence of DiagnosticsConnection being deprecated. See corresponding docs for further information.

Method Detail

addBatchback to summary
public final void addBatch(String sql) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.addBatch.

Implements java.sql.Statement.addBatch.

Doc from java.sql.Statement.addBatch.

Adds the given SQL command to the current list of commands for this Statement object. The commands in this list can be executed as a batch by calling the method executeBatch.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

typically this is a SQL INSERT or UPDATE statement

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the driver does not support batch updates, the method is called on a PreparedStatement or CallableStatement
executeback to summary
public final boolean execute(String sql) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Doc from java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results. In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

any SQL statement

Returns:boolean

true if the first result is a ResultSet object; false if it is an update count or there are no results

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the method is called on a PreparedStatement or CallableStatement
executeback to summary
public final boolean execute(String sql, int autoGeneratedKeys) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Doc from java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. The driver will ignore this signal if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

any SQL statement

autoGeneratedKeys:int

a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS

Returns:boolean

true if the first result is a ResultSet object; false if it is an update count or there are no results

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the second parameter supplied to this method is not Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS, the method is called on a PreparedStatement or CallableStatement
executeback to summary
public final boolean execute(String sql, int[] columnIndexes) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Doc from java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

Under some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

any SQL statement

columnIndexes:int[]

an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys

Returns:boolean

true if the first result is a ResultSet object; false if it is an update count or there are no results

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the elements in the int array passed to this method are not valid column indexes, the method is called on a PreparedStatement or CallableStatement
executeback to summary
public final boolean execute(String sql, String[] columnNames) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Doc from java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

any SQL statement

columnNames:String[]

an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys

Returns:boolean

true if the next result is a ResultSet object; false if it is an update count or there are no more results

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the elements of the String array passed to this method are not valid column names, the method is called on a PreparedStatement or CallableStatement
executeLargeUpdateback to summary
public final long executeLargeUpdate(String sql) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Doc from java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

This method should be used when the returned row count may exceed Integer#MAX_VALUE.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

The default implementation will throw UnsupportedOperationException

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

Returns:long

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the given SQL statement produces a ResultSet object, the method is called on a PreparedStatement or CallableStatement
executeLargeUpdateback to summary
public final long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Doc from java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval. The driver will ignore the flag if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

This method should be used when the returned row count may exceed Integer#MAX_VALUE.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

The default implementation will throw SQLFeatureNotSupportedException

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

autoGeneratedKeys:int

a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS

Returns:long

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the given SQL statement returns a ResultSet object, the given constant is not one of those allowed, the method is called on a PreparedStatement or CallableStatement
executeLargeUpdateback to summary
public final long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Doc from java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

This method should be used when the returned row count may exceed Integer#MAX_VALUE.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

The default implementation will throw SQLFeatureNotSupportedException

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

columnIndexes:int[]

an array of column indexes indicating the columns that should be returned from the inserted row

Returns:long

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the SQL statement returns a ResultSet object,the second argument supplied to this method is not an int array whose elements are valid column indexes, the method is called on a PreparedStatement or CallableStatement
executeLargeUpdateback to summary
public final long executeLargeUpdate(String sql, String[] columnNames) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Doc from java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

This method should be used when the returned row count may exceed Integer#MAX_VALUE.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

The default implementation will throw SQLFeatureNotSupportedException

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

columnNames:String[]

an array of the names of the columns that should be returned from the inserted row

Returns:long

either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the SQL statement returns a ResultSet object, the second argument supplied to this method is not a String array whose elements are valid column names, the method is called on a PreparedStatement or CallableStatement
executeQueryback to summary
public final ResultSet executeQuery(String sql) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeQuery.

Implements java.sql.Statement.executeQuery.

Doc from java.sql.Statement.executeQuery.

Executes the given SQL statement, which returns a single ResultSet object.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

an SQL statement to be sent to the database, typically a static SQL SELECT statement

Returns:ResultSet

a ResultSet object that contains the data produced by the given query; never null

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the given SQL statement produces anything other than a single ResultSet object, the method is called on a PreparedStatement or CallableStatement
executeQueryback to summary
public ResultSet executeQuery() throws SQLException

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.executeQuery.

Implements java.sql.PreparedStatement.executeQuery.

Doc from java.sql.PreparedStatement.executeQuery.

Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.

Returns:ResultSet

a ResultSet object that contains the data produced by the query; never null

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs; this method is called on a closed PreparedStatement or the SQL statement does not return a ResultSet object
executeUpdateback to summary
public final int executeUpdate(String sql) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Doc from java.sql.Statement.executeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

Returns:int

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the given SQL statement produces a ResultSet object, the method is called on a PreparedStatement or CallableStatement
executeUpdateback to summary
public final int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Doc from java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval. The driver will ignore the flag if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

autoGeneratedKeys:int

a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS

Returns:int

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the given SQL statement returns a ResultSet object, the given constant is not one of those allowed, the method is called on a PreparedStatement or CallableStatement
executeUpdateback to summary
public final int executeUpdate(String sql, int[] columnIndexes) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Doc from java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

columnIndexes:int[]

an array of column indexes indicating the columns that should be returned from the inserted row

Returns:int

either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the SQL statement returns a ResultSet object, the second argument supplied to this method is not an int array whose elements are valid column indexes, the method is called on a PreparedStatement or CallableStatement
executeUpdateback to summary
public final int executeUpdate(String sql, String[] columnNames) throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Doc from java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such statements is vendor-specific).

Note

This method cannot be called on a PreparedStatement or CallableStatement.

Parameters
sql:String

an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.

columnNames:String[]

an array of the names of the columns that should be returned from the inserted row

Returns:int

either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs, this method is called on a closed Statement, the SQL statement returns a ResultSet object, the second argument supplied to this method is not a String array whose elements are valid column names, the method is called on a PreparedStatement or CallableStatement
getConnectionback to summary
public final Connection getConnection() throws SQLException

Overrides org.jooq.tools.jdbc.DefaultStatement.getConnection.

Implements java.sql.Statement.getConnection.

Doc from java.sql.Statement.getConnection.

Retrieves the Connection object that produced this Statement object.

Returns:Connection

the connection that produced this statement

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs or this method is called on a closed Statement