All Superinterfaces:
AutoCloseable, Wrapper
All Known Subinterfaces:
CallableStatement, PreparedStatement

  • Field Summary

    Fields

    static final int

    The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.

    static final int

    The constant indicating that the current ResultSet object should be closed when calling getMoreResults.

    static final int

    The constant indicating that an error occurred while executing a batch statement.

    static final int

    The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.

    static final int

    The constant indicating that generated keys should not be made available for retrieval.

    static final int

    The constant indicating that generated keys should be made available for retrieval.

    static final int

    The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available.

  • Method Summary

    void

    Adds the given SQL command to the current list of commands for this Statement object.

    void

    cancel()

    Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.

    void

    Empties this Statement object's current list of SQL commands.

    void

    Clears all the warnings reported on this Statement object.

    void

    close()

    Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

    void

    Specifies that this Statement will be closed when all its dependent result sets are closed.

    enquoteIdentifier(String identifier, boolean alwaysQuote)

    Returns a SQL identifier.

    Returns a String enclosed in single quotes.

    Returns a String representing a National Character Set Literal enclosed in single quotes and prefixed with a upper case letter N.

    boolean

    Executes the given SQL statement, which may return multiple results.

    boolean

    execute(String sql, int autoGeneratedKeys)

    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.

    boolean

    execute(String sql, int[] columnIndexes)

    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.

    boolean

    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.

    int[]

    Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

    default long[]

    Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

    default long

    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.

    default long

    executeLargeUpdate(String sql, int autoGeneratedKeys)

    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.

    default long

    executeLargeUpdate(String sql, int[] columnIndexes)

    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.

    default long

    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.

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

    int

    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.

    int

    executeUpdate(String sql, int autoGeneratedKeys)

    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.

    int

    executeUpdate(String sql, int[] columnIndexes)

    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.

    int

    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.

    Retrieves the Connection object that produced this Statement object.

    int

    Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.

    int

    Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.

    Retrieves any auto-generated keys created as a result of executing this Statement object.

    default long

    Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.

    default long

    Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.

    int

    Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.

    int

    Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.

    boolean

    Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.

    boolean

    getMoreResults(int current)

    Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.

    int

    Retrieves the number of seconds the driver will wait for a Statement object to execute.

    Retrieves the current result as a ResultSet object.

    int

    Retrieves the result set concurrency for ResultSet objects generated by this Statement object.

    int

    Retrieves the result set holdability for ResultSet objects generated by this Statement object.

    int

    Retrieves the result set type for ResultSet objects generated by this Statement object.

    int

    Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.

    Retrieves the first warning reported by calls on this Statement object.

    boolean

    isClosed()

    Retrieves whether this Statement object has been closed.

    boolean

    Returns a value indicating whether this Statement will be closed when all its dependent result sets are closed.

    boolean

    Returns a value indicating whether the Statement is poolable or not.

    default boolean

    Retrieves whether identifier is a simple SQL identifier.

    void

    Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.

    void

    setEscapeProcessing(boolean enable)

    Sets escape processing on or off.

    void

    setFetchDirection(int direction)

    Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.

    void

    setFetchSize(int rows)

    Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects generated by this Statement.

    default void

    setLargeMaxRows(long max)

    Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number.

    void

    setMaxFieldSize(int max)

    Sets the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.

    void

    setMaxRows(int max)

    Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number.

    void

    setPoolable(boolean poolable)

    Requests that a Statement be pooled or not pooled.

    void

    setQueryTimeout(int seconds)

    Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.

  • Field Details

    • CLOSE_CURRENT_RESULT

    • KEEP_CURRENT_RESULT

    • CLOSE_ALL_RESULTS

    • SUCCESS_NO_INFO

    • EXECUTE_FAILED

    • RETURN_GENERATED_KEYS

    • NO_GENERATED_KEYS

  • Method Details

    • executeQuery

    • executeUpdate

    • close

    • getMaxFieldSize

    • setMaxFieldSize

    • getMaxRows

    • setMaxRows

    • setEscapeProcessing

    • getQueryTimeout

    • setQueryTimeout

    • cancel

    • getWarnings

    • clearWarnings

    • setCursorName

    • execute

    • getResultSet

    • getUpdateCount

    • getMoreResults

    • setFetchDirection

    • getFetchDirection

    • setFetchSize

    • getFetchSize

    • getResultSetConcurrency

    • getResultSetType

    • addBatch

    • clearBatch

    • executeBatch

    • getConnection

    • getMoreResults

    • getGeneratedKeys

    • executeUpdate

    • executeUpdate

    • executeUpdate

    • execute

    • execute

    • execute

    • getResultSetHoldability

    • isClosed

    • setPoolable

    • isPoolable

    • closeOnCompletion

    • isCloseOnCompletion

    • getLargeUpdateCount

    • setLargeMaxRows

    • getLargeMaxRows

    • executeLargeBatch

    • executeLargeUpdate

    • executeLargeUpdate

    • executeLargeUpdate

    • executeLargeUpdate

    • enquoteLiteral

    • enquoteIdentifier

    • isSimpleIdentifier

    • enquoteNCharLiteral