Class MonetStatement

java.lang.Object
org.monetdb.monetdbe.MonetWrapper
org.monetdb.monetdbe.MonetStatement
All Implemented Interfaces:
AutoCloseable, Statement, Wrapper
Direct Known Subclasses:
MonetPreparedStatement

public class MonetStatement
extends MonetWrapper
implements Statement
A Statement suitable for the MonetDB embedded database. The object used for executing a static SQL statement and returning the results it produces. By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a Statement's current ResultSet object if an open one exists.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected List<String> batch
    Batched SQL queries to execute
    protected MonetConnection conn
    This statement's parent connection object
    protected long largeUpdateCount
    Current updateCount (number of affected rows) for executeLarge methods
    protected MonetResultSet resultSet
    The current result set
    protected int updateCount
    Current updateCount (number of affected rows)
  • Constructor Summary

    Constructors 
    Constructor Description
    MonetStatement​(MonetConnection conn)
    Default MonetStatement constructor.
    MonetStatement​(MonetConnection conn, int queryTimeout)
    MonetStatement constructor with query timeout value.
    MonetStatement​(MonetConnection conn, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
    MonetStatement constructor with parameterized result set options.
  • Method Summary

    Modifier and Type Method Description
    void addBatch​(String sql)
    Adds the given SQL command to the current list of commands for this Statement object.
    void cancel()
    This feature is not currently supported.
    void checkNotClosed()
    Helper method to test whether the Statement object is closed When closed, it throws an SQLException
    void clearBatch()
    Empties this Statement object's current list of SQL commands.
    void clearWarnings()
    Clears all warnings reported for 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.
    protected void closeIfComplete()
    Called by the result set object when it is closed Used to close statement if closeOnCompletion() was called
    void closeOnCompletion()
    Specifies that this Statement will be closed when all its dependent result sets are closed.
    boolean execute​(String sql)
    The execute method executes the given SQL statement and indicates the form of the first result.
    boolean execute​(String sql, int autoGeneratedKeys)
    Feature not supported.
    boolean execute​(String sql, int[] columnIndexes)
    Feature not supported.
    boolean execute​(String sql, String[] columnNames)
    Feature not supported.
    int[] executeBatch()
    Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
    long[] executeLargeBatch()
    Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
    long executeLargeUpdate​(String sql)
    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.
    long executeLargeUpdate​(String sql, int autoGeneratedKeys)
    Feature not supported.
    long executeLargeUpdate​(String sql, int[] columnIndexes)
    Feature not supported.
    long executeLargeUpdate​(String sql, String[] columnNames)
    Feature not supported.
    ResultSet executeQuery​(String sql)
    Executes the given SQL statement, which returns a single ResultSet object.
    int executeUpdate​(String sql)
    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)
    Feature not supported.
    int executeUpdate​(String sql, int[] columnIndexes)
    Feature not supported.
    int executeUpdate​(String sql, String[] columnNames)
    Feature not supported.
    Connection getConnection()
    Retrieves the Connection object that produced this Statement object.
    int getFetchDirection()
    Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
    int getFetchSize()
    Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
    ResultSet getGeneratedKeys()
    Feature not supported.
    long getLargeMaxRows()
    Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
    long getLargeUpdateCount()
    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 getMaxFieldSize()
    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 getMaxRows()
    Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
    boolean getMoreResults()
    Feature currently not supported.
    boolean getMoreResults​(int current)
    Feature currently not supported.
    int getQueryTimeout()
    Retrieves the number of seconds the driver will wait for a Statement object to execute.
    ResultSet getResultSet()
    Retrieves the current result as a ResultSet object.
    int getResultSetConcurrency()
    Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
    int getResultSetHoldability()
    Retrieves the result set holdability for ResultSet objects generated by this Statement object.
    int getResultSetType()
    Retrieves the result set type for ResultSet objects generated by this Statement object.
    int getUpdateCount()
    Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
    SQLWarning getWarnings()
    Retrieves the first warning reported by calls on this Statement object.
    boolean isClosed()
    Retrieves whether this Statement object has been closed.
    boolean isCloseOnCompletion()
    Returns a value indicating whether this Statement will be closed when all its dependent result sets are closed.
    boolean isPoolable()
    Returns a value indicating whether the Statement is poolable or not.
    void setCursorName​(String name)
    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.
    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)
    Feature not supported
    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.

    Methods inherited from class org.monetdb.monetdbe.MonetWrapper

    isWrapperFor, unwrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.sql.Wrapper

    isWrapperFor, unwrap
  • Field Details

    • conn

      protected MonetConnection conn
      This statement's parent connection object
    • resultSet

      protected MonetResultSet resultSet
      The current result set
    • batch

      protected List<String> batch
      Batched SQL queries to execute
    • updateCount

      protected int updateCount
      Current updateCount (number of affected rows)
    • largeUpdateCount

      protected long largeUpdateCount
      Current updateCount (number of affected rows) for executeLarge methods
  • Constructor Details

    • MonetStatement

      public MonetStatement​(MonetConnection conn)
      Default MonetStatement constructor.
      Parameters:
      conn - the connection that created this Statement
    • MonetStatement

      public MonetStatement​(MonetConnection conn, int queryTimeout)
      MonetStatement constructor with query timeout value.
      Parameters:
      conn - the connection that created this Statement
      queryTimeout - the timeout before aborting a query execution
    • MonetStatement

      public MonetStatement​(MonetConnection conn, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
      MonetStatement constructor with parameterized result set options.
      Parameters:
      conn - the connection that created this Statement
      resultSetType - type of ResultSet to produce
      resultSetConcurrency - concurrency of ResultSet to produce
      resultSetHoldability - holdability of ResultSet after commit
  • Method Details

    • checkNotClosed

      public void checkNotClosed() throws SQLException
      Helper method to test whether the Statement object is closed When closed, it throws an SQLException
      Throws:
      SQLException - if this method is called on a closed Statement
    • close

      public void close() throws SQLException
      Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. Calling the method close on a Statement object that is already closed has no effect. A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Statement
      Throws:
      SQLException - if this method is called on a closed Statement
    • cancel

      public void cancel() throws SQLException
      This feature is not currently supported.
      Specified by:
      cancel in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • isClosed

      public boolean isClosed() throws SQLException
      Retrieves whether this Statement object has been closed. A Statement is closed if the method close has been called on it, or if it is automatically closed.
      Specified by:
      isClosed in interface Statement
      Returns:
      true if this Statement object is closed; false if it is still open
      Throws:
      SQLException
    • closeOnCompletion

      public void closeOnCompletion() throws SQLException
      Specifies that this Statement will be closed when all its dependent result sets are closed. If execution of the Statement does not produce any result sets, this method has no effect.
      Specified by:
      closeOnCompletion in interface Statement
      Throws:
      SQLException - if this method is called on a closed Statement
    • isCloseOnCompletion

      public boolean isCloseOnCompletion() throws SQLException
      Returns a value indicating whether this Statement will be closed when all its dependent result sets are closed.
      Specified by:
      isCloseOnCompletion in interface Statement
      Returns:
      true if the Statement will be closed when all of its dependent result sets are closed; false otherwise
      Throws:
      SQLException - if this method is called on a closed Statement
    • closeIfComplete

      protected void closeIfComplete() throws SQLException
      Called by the result set object when it is closed Used to close statement if closeOnCompletion() was called
      Throws:
      SQLException - if this method is called on a closed Statement
    • execute

      public boolean execute​(String sql) throws SQLException
      The execute method executes the given SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result (either a ResultSet object or an int representing the update count). Multiple results may result from the SQL statement, but only the first one may be retrieved in the current version. The result set or update count object variables are set within monetdbe_query().
      Specified by:
      execute in interface Statement
      Parameters:
      sql - any SQL statement
      Returns:
      true if the first result is a ResultSet object; false if it is an update count or there are no results
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed Statement
    • executeQuery

      public ResultSet executeQuery​(String sql) throws SQLException
      Executes the given SQL statement, which returns a single ResultSet object. Multiple results may result from the SQL statement, but only the first one may be retrieved in the current version.
      Specified by:
      executeQuery in interface Statement
      Parameters:
      sql - an SQL statement to be sent to the database, typically a static SQL SELECT statement
      Returns:
      a ResultSet object that contains the data produced by the given query; never null
      Throws:
      SQLException - if a database access error occurs or the given SQL statement produces anything other than a single ResultSet object
    • executeUpdate

      public int executeUpdate​(String sql) throws SQLException
      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.
      Specified by:
      executeUpdate in interface Statement
      Parameters:
      sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
      Returns:
      either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
      Throws:
      SQLException - if a database access error occurs or the given SQL statement produces a ResultSet object
    • executeLargeUpdate

      public long executeLargeUpdate​(String sql) throws SQLException
      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. The result set or large update count object variables are set within monetdbe_query().
      Specified by:
      executeLargeUpdate in interface Statement
      Parameters:
      sql - 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:
      either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
      Throws:
      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
    • executeBatch

      public int[] executeBatch() throws SQLException
      Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
      1. A number greater than or equal to zero -- indicates that the command was processed successfull and is an update count giving the number of rows in the database that were affected by the command's execution
      2. A value of SUCCESS_NO_INFO -- indicates that the command was processed successfully but that the number of rows affected is unknown
      Specified by:
      executeBatch in interface Statement
      Returns:
      an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed Statement
      BatchUpdateException - if one of the commands sent to the database fails to execute properly or attempts to return a result set
    • addBatch

      public void addBatch​(String sql) throws SQLException
      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.
      Specified by:
      addBatch in interface Statement
      Parameters:
      sql - typically this is a SQL INSERT or UPDATE statement
      Throws:
      SQLException - if a database access error occurs, this method is called on a closed Statement, the driver does not support batch updatesor the method is called on a PreparedStatement or CallableStatement
    • clearBatch

      public void clearBatch() throws SQLException
      Empties this Statement object's current list of SQL commands.
      Specified by:
      clearBatch in interface Statement
      Throws:
      SQLException - if a database access error occurs, this method is called on a closed Statement or the driver does not support batch updates
    • executeLargeBatch

      public long[] executeLargeBatch() throws SQLException
      Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The long elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. This method should be used when the returned row count may exceed Integer.MAX_VALUE.
      Specified by:
      executeLargeBatch in interface Statement
      Returns:
      an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed Statement
      BatchUpdateException - if one of the commands sent to the database fails to execute properly or attempts to return a result set
    • getMoreResults

      public boolean getMoreResults​(int current) throws SQLException
      Feature currently not supported.
      Specified by:
      getMoreResults in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • getMoreResults

      public boolean getMoreResults() throws SQLException
      Feature currently not supported.
      Specified by:
      getMoreResults in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • getUpdateCount

      public int getUpdateCount() throws SQLException
      Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. This method should be called only once per result.
      Specified by:
      getUpdateCount in interface Statement
      Returns:
      the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
      Throws:
      SQLException - if this method is called on a closed Statement
    • getResultSet

      public ResultSet getResultSet() throws SQLException
      Retrieves the current result as a ResultSet object. This method should be called only once per result.
      Specified by:
      getResultSet in interface Statement
      Returns:
      the current result as a ResultSet object or null if the result is an update count or there are no more results
      Throws:
      SQLException - if this method is called on a closed Statement
    • setEscapeProcessing

      public void setEscapeProcessing​(boolean enable) throws SQLException
      Sets escape processing on or off. This feature is not supported by this driver, so calling this method will add a SQL warning.
      Specified by:
      setEscapeProcessing in interface Statement
      Parameters:
      enable - true to enable escape processing; false to disable it
      Throws:
      SQLException - if this method is called on a closed Statement
    • getQueryTimeout

      public int getQueryTimeout() throws SQLException
      Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded, a SQLException is thrown. The current version of the driver does not support query timeout, so this limit will have no effect on query execution.
      Specified by:
      getQueryTimeout in interface Statement
      Returns:
      the current query timeout limit in seconds; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement
    • setQueryTimeout

      public void setQueryTimeout​(int seconds) throws SQLException
      Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. By default there is no limit on the amount of time allowed for a running statement to complete. If the limit is exceeded, an SQLTimeoutException is thrown. The driver must apply this limit to the execute, executeQuery and executeUpdate methods. The current version of the driver does not support query timeout, so this limit will have no effect on query execution.
      Specified by:
      setQueryTimeout in interface Statement
      Parameters:
      seconds - the new query timeout limit in seconds; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement or the condition seconds >= 0 is not satisfied
    • getWarnings

      public SQLWarning getWarnings() throws SQLException
      Retrieves the first warning reported by calls on this Statement object. If there is more than one warning, subsequent warnings will be chained to the first one and can be retrieved by calling the method SQLWarning.getNextWarning on the warning that was retrieved previously.
      Specified by:
      getWarnings in interface Statement
      Returns:
      the first SQLWarning object or null if there are none
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed connection
    • clearWarnings

      public void clearWarnings() throws SQLException
      Clears all warnings reported for this Statement object. After a call to this method, the method getWarnings returns null until a new warning is reported for this Connection object.
      Specified by:
      clearWarnings in interface Statement
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed connection
    • setCursorName

      public void setCursorName​(String name) throws SQLException
      Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods. Because positioned updates/deletes are not supported by this driver, this will add a SQL warning.
      Specified by:
      setCursorName in interface Statement
      Parameters:
      name - the new cursor name, which must be unique within a connection
      Throws:
      SQLException - if this method is called on a closed Statement
    • setFetchDirection

      public void setFetchDirection​(int direction) throws SQLException
      Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
      Specified by:
      setFetchDirection in interface Statement
      Parameters:
      direction - the initial direction for processing rows
      Throws:
      SQLException - if this method is called on a closed Statement or the given direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
    • getFetchDirection

      public int getFetchDirection() throws SQLException
      Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
      Specified by:
      getFetchDirection in interface Statement
      Returns:
      the default fetch direction for result sets generated from this Statement object
      Throws:
      SQLException - if this method is called on a closed Statement
    • setFetchSize

      public void setFetchSize​(int rows) throws SQLException
      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. If the value specified is zero, then the hint is ignored. The default value is zero.
      Specified by:
      setFetchSize in interface Statement
      Parameters:
      rows - the number of rows to fetch
      Throws:
      SQLException - if this method is called on a closed Statement or the condition rows >= 0 is not satisfied
    • getFetchSize

      public int getFetchSize() throws SQLException
      Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
      Specified by:
      getFetchSize in interface Statement
      Returns:
      the default fetch size for result sets generated from this Statement object
      Throws:
      SQLException - if this method is called on a closed Statement
    • getResultSetConcurrency

      public int getResultSetConcurrency() throws SQLException
      Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
      Specified by:
      getResultSetConcurrency in interface Statement
      Returns:
      either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
      Throws:
      SQLException - if this method is called on a closed Statement
    • getResultSetType

      public int getResultSetType() throws SQLException
      Retrieves the result set type for ResultSet objects generated by this Statement object.
      Specified by:
      getResultSetType in interface Statement
      Returns:
      one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
      Throws:
      SQLException - if this method is called on a closed Statement
    • getConnection

      public Connection getConnection() throws SQLException
      Retrieves the Connection object that produced this Statement object.
      Specified by:
      getConnection in interface Statement
      Returns:
      the connection that produced this statement
      Throws:
      SQLException - if this method is called on a closed Statement
    • getResultSetHoldability

      public int getResultSetHoldability() throws SQLException
      Retrieves the result set holdability for ResultSet objects generated by this Statement object.
      Specified by:
      getResultSetHoldability in interface Statement
      Returns:
      either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
      Throws:
      SQLException - if this method is called on a closed Statement
    • setPoolable

      public void setPoolable​(boolean poolable) throws SQLException
      Feature not supported
      Specified by:
      setPoolable in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • isPoolable

      public boolean isPoolable() throws SQLException
      Returns a value indicating whether the Statement is poolable or not.
      Specified by:
      isPoolable in interface Statement
      Returns:
      false
      Throws:
      SQLException - if this method is called on a closed Statement
    • getLargeUpdateCount

      public long getLargeUpdateCount() throws SQLException
      Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. This method should be called only once per result. This method should be used when the returned row count may exceed Integer.MAX_VALUE.
      Specified by:
      getLargeUpdateCount in interface Statement
      Returns:
      the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
      Throws:
      SQLException - if this method is called on a closed Statement
    • setLargeMaxRows

      public void setLargeMaxRows​(long max) throws SQLException
      Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped. This method should be used when the row limit may exceed Integer.MAX_VALUE.
      Specified by:
      setLargeMaxRows in interface Statement
      Parameters:
      max - the new max rows limit; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement or the condition max >= 0 is not satisfied
    • getLargeMaxRows

      public long getLargeMaxRows() throws SQLException
      Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. If this limit is exceeded, the excess rows are silently dropped. This method should be used when the returned row limit may exceed Integer.MAX_VALUE.
      Specified by:
      getLargeMaxRows in interface Statement
      Returns:
      the current maximum number of rows for a ResultSet object produced by this Statement object; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement
    • getMaxFieldSize

      public int getMaxFieldSize() throws SQLException
      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.
      Specified by:
      getMaxFieldSize in interface Statement
      Returns:
      zero, meaning there is no column size limit for columns storing character and binary values
      Throws:
      SQLException - if this method is called on a closed Statement
    • setMaxFieldSize

      public void setMaxFieldSize​(int max) throws SQLException
      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.
      Specified by:
      setMaxFieldSize in interface Statement
      Parameters:
      max - the new column size limit in bytes; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement or the condition max >= 0 is not satisfied
    • getMaxRows

      public int getMaxRows() throws SQLException
      Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. If this limit is exceeded, the excess rows are silently dropped.
      Specified by:
      getMaxRows in interface Statement
      Returns:
      the current maximum number of rows for a ResultSet object produced by this Statement object; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement
    • setMaxRows

      public void setMaxRows​(int max) throws SQLException
      Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped.
      Specified by:
      setMaxRows in interface Statement
      Parameters:
      max - the new max rows limit; zero means there is no limit
      Throws:
      SQLException - if this method is called on a closed Statement or the condition max >= 0 is not satisfied
    • execute

      public boolean execute​(String sql, int autoGeneratedKeys) throws SQLException
      Feature not supported.
      Specified by:
      execute in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • execute

      public boolean execute​(String sql, int[] columnIndexes) throws SQLException
      Feature not supported.
      Specified by:
      execute in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • execute

      public boolean execute​(String sql, String[] columnNames) throws SQLException
      Feature not supported.
      Specified by:
      execute in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeUpdate

      public int executeUpdate​(String sql, int autoGeneratedKeys) throws SQLException
      Feature not supported.
      Specified by:
      executeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeUpdate

      public int executeUpdate​(String sql, int[] columnIndexes) throws SQLException
      Feature not supported.
      Specified by:
      executeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeUpdate

      public int executeUpdate​(String sql, String[] columnNames) throws SQLException
      Feature not supported.
      Specified by:
      executeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeLargeUpdate

      public long executeLargeUpdate​(String sql, int autoGeneratedKeys) throws SQLException
      Feature not supported.
      Specified by:
      executeLargeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeLargeUpdate

      public long executeLargeUpdate​(String sql, int[] columnIndexes) throws SQLException
      Feature not supported.
      Specified by:
      executeLargeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • executeLargeUpdate

      public long executeLargeUpdate​(String sql, String[] columnNames) throws SQLException
      Feature not supported.
      Specified by:
      executeLargeUpdate in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException
    • getGeneratedKeys

      public ResultSet getGeneratedKeys() throws SQLException
      Feature not supported.
      Specified by:
      getGeneratedKeys in interface Statement
      Throws:
      SQLFeatureNotSupportedException - This feature is not supported
      SQLException