Package virtuoso.jdbc4

## Class VirtuosoStatement

- java.lang.Object
- - virtuoso.jdbc4.VirtuosoStatement

All Implemented Interfaces:
  `java.lang.AutoCloseable`, `java.sql.Statement`, `java.sql.Wrapper`

Direct Known Subclasses:
  `VirtuosoPreparedStatement`

    public class VirtuosoStatement
    extends java.lang.Object
    implements java.sql.Statement

The VirtuosoStatement class is an implementation of the Statement interface in the JDBC API which represents a statement. You can obtain a Statement like below :

       Statement s = connection.createStatement()

See Also:
  `Connection.createStatement()`

### Field Summary

Fields
`protected java.util.LinkedList<java.lang.Object>` `batch`
`protected boolean` `close_flag`
`protected boolean` `closeOnCompletion`
`protected VirtuosoConnection` `connection`
`protected java.lang.String` `cursorName`
`protected int` `exec_type`
`protected virtuoso.jdbc4.VirtuosoFuture` `future`
`protected boolean` `isCached`
`protected VirtuosoResultSetMetaData` `metaData`
`protected Vector` `objparams`
`protected Vector` `parameters`
`protected VirtuosoParameterMetaData` `paramsMetaData`
`protected int` `prefetch`
`protected static int` `req_no`
`protected boolean` `result_opened`
`protected int` `rpc_timeout`
`protected boolean` `sparql_executed`
`protected java.lang.String` `statid`
`protected int` `txn_timeout`
`protected int` `type`
`protected VirtuosoResultSet` `vresultSet`
`protected boolean` `wait_result`

### Fields inherited from interface java.sql.Statement

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addBatch​(java.lang.String sql)` Adds a SQL command to the current batch of commands for the statement.
`void` `cancel​()` Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
`protected void` `cancel_rs​()`
`void` `clearBatch​()` Makes the set of commands in the current batch empty.
`void` `clearWarnings​()` Clears all the warnings reported on this Statement object.
`void` `close​()` Releases this Statement object's database and JDBC resources immediately instead of new wait for this to happen when it is automatically closed.
`void` `close_rs​(boolean close_stmt, boolean is_prepared)`
`void` `closeOnCompletion​()` Specifies that this `Statement` will be closed when all its dependent result sets are closed.
`boolean` `execute​(java.lang.String sql)` Executes a SQL statement that may return multiple results.
`boolean` `execute​(java.lang.String sql, int autoGeneratedKeys)`
`boolean` `execute​(java.lang.String sql, int[] columnIndexes)`
`boolean` `execute​(java.lang.String sql, java.lang.String[] columnNames)`
`int[]` `executeBatch​()` Submits a batch of commands to the database for execution.
`java.sql.ResultSet` `executeQuery​(java.lang.String sql)` Executes a SQL statement that returns a single ResultSet.
`int` `executeUpdate​(java.lang.String sql)` Executes an SQL INSERT, UPDATE or DELETE statement.
`int` `executeUpdate​(java.lang.String sql, int autoGeneratedKeys)`
`int` `executeUpdate​(java.lang.String sql, int[] columnIndexes)`
`int` `executeUpdate​(java.lang.String sql, java.lang.String[] columnNames)`
`void` `finalize​()` Method runs when the garbage collector want to erase the object
`java.sql.Connection` `getConnection​()` Returns the VirtuosoConnection object that produced this VirtuosoStatement object.
`int` `getExecType​()` Returns the type of executing query.
`int` `getFetchDirection​()` Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this VirtuosoStatement object.
`int` `getFetchSize​()` Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object.
`java.sql.ResultSet` `getGeneratedKeys​()`
`int` `getMaxFieldSize​()` Returns the maximum number of bytes allowed for any column value.
`int` `getMaxRows​()` Retrieves the maximum number of rows that a VirtuosoResultSet can contain.
`boolean` `getMoreResults​()` Moves to a Statement's next result.
`boolean` `getMoreResults​(int current)`
`int` `getQueryTimeout​()` Retrieves the number of seconds the driver will new wait for a Statement to execute.
`java.sql.ResultSet` `getResultSet​()` Returns the current result as a VirtuosoResultSet object.
`int` `getResultSetConcurrency​()` Returns the result set concurrency.
`int` `getResultSetHoldability​()`
`int` `getResultSetType​()` Returns the result set type.
`protected VectorOfLong` `getStmtOpts​()`
`int` `getUpdateCount​()` Returns the current result as an update count; if the result is a ResultSet or there are no more results, -1 is returned.
`java.sql.SQLWarning` `getWarnings​()` Retrieves the first warning reported by calls on this Statement.
`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.
`boolean` `isWrapperFor​(java.lang.Class<?> iface)` Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
`protected void` `notify_error​(java.lang.Throwable e)`
`protected VirtuosoResultSet` `sendQuery​(java.lang.String sql)` Executes a SQL statement that returns a single ResultSet.
`void` `setCursorName​(java.lang.String name)` Defines the SQL cursor name that will be used by subsequent Statement `execute` methods.
`void` `setEscapeProcessing​(boolean enable)` Toggles on and off escape substitution before sending SQL to the database.
`void` `setFetchDirection​(int direction)` Sets the default fetch direction for result sets generated by this VirtuosoStatement 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.
`void` `setMaxFieldSize​(int max)` Sets the limit for the maximum number of bytes in a column to the given number of bytes.
`void` `setMaxRows​(int max)` Sets the limit for the maximum number of rows that any VirtuosoResultSet 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 new wait for a Statement to execute to the given number of seconds.
`<T> T` `unwrap​(java.lang.Class<T> iface)` Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

### Methods inherited from class java.lang.Object

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

### Methods inherited from interface java.sql.Statement

`enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows`

### Field Detail

#### parameters

    protected Vector parameters

#### objparams

    protected Vector objparams

#### batch

    protected java.util.LinkedList<java.lang.Object> batch

#### type

    protected int type

#### exec_type

    protected int exec_type

#### connection

    protected VirtuosoConnection connection

#### prefetch

    protected int prefetch

#### txn_timeout

    protected int txn_timeout

#### rpc_timeout

    protected int rpc_timeout

#### statid

    protected java.lang.String statid

#### cursorName

    protected java.lang.String cursorName

#### close_flag

    protected volatile boolean close_flag

#### wait_result

    protected boolean wait_result

#### result_opened

    protected boolean result_opened

#### sparql_executed

    protected boolean sparql_executed

#### req_no

    protected static int req_no

#### vresultSet

    protected volatile VirtuosoResultSet vresultSet

#### future

    protected virtuoso.jdbc4.VirtuosoFuture future

#### metaData

    protected VirtuosoResultSetMetaData metaData

#### isCached

    protected boolean isCached

#### closeOnCompletion

    protected boolean closeOnCompletion

#### paramsMetaData

    protected VirtuosoParameterMetaData paramsMetaData

### Method Detail

#### getStmtOpts

    protected VectorOfLong getStmtOpts​()
                                throws VirtuosoException

Throws:
  `VirtuosoException`

#### sendQuery

    protected VirtuosoResultSet sendQuery​(java.lang.String sql)
                                   throws VirtuosoException

Executes a SQL statement that returns a single ResultSet.

Parameters:
  `sql` - the SQL request.
Returns:
  ResultSet A ResultSet that contains the data produced by the query; never null.
Throws:
  `VirtuosoException` - If a database access error occurs.

#### finalize

    public void finalize​()
                  throws java.lang.Throwable

Method runs when the garbage collector want to erase the object

Overrides:
  `finalize` in class `java.lang.Object`
Throws:
  `java.lang.Throwable`

#### cancel

    public void cancel​()
                throws VirtuosoException

Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. This method can be used by one thread to cancel a statement that is being executed by another thread.

Specified by:
  `cancel` in interface `java.sql.Statement`
Throws:
  `VirtuosoException` - If a database access error occurs

#### cancel_rs

    protected void cancel_rs​()
                      throws VirtuosoException

Throws:
  `VirtuosoException`

#### close_rs

    public void close_rs​(boolean close_stmt,
                         boolean is_prepared)
                  throws VirtuosoException

Throws:
  `VirtuosoException`

#### clearWarnings

    public void clearWarnings​()
                       throws VirtuosoException

Clears all the warnings reported on this Statement object. Virtuoso does not generate warnings, so this function does nothing.

Specified by:
  `clearWarnings` in interface `java.sql.Statement`
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.clearWarnings()`

#### close

    public void close​()
               throws VirtuosoException

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

Specified by:
  `close` in interface `java.lang.AutoCloseable`
Specified by:
  `close` in interface `java.sql.Statement`
Throws:
  `VirtuosoException` - If a database access error occurs.
See Also:
  `Statement.close()`

#### execute

    public boolean execute​(java.lang.String sql)
                    throws VirtuosoException

Executes a SQL statement that may return multiple results. This method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Specified by:
  `execute` in interface `java.sql.Statement`
Parameters:
  `sql` - Any SQL statement.
Returns:
  boolean True if the next result is a ResultSet; false if it is an update count or there are no more results.
Throws:
  `VirtuosoException` - If a database access error occurs.
See Also:
  `getResultSet()`, `getUpdateCount()`, `getMoreResults()`, `Statement.execute(java.lang.String)`

#### executeQuery

    public java.sql.ResultSet executeQuery​(java.lang.String sql)
                                    throws VirtuosoException

Executes a SQL statement that returns a single ResultSet.

Specified by:
  `executeQuery` in interface `java.sql.Statement`
Parameters:
  `sql` - Typically this is a static SQL SELECT statement. (null is possible)
Returns:
  ResultSet A ResultSet that contains the data produced by the query; never null.
Throws:
  `VirtuosoException` - If a database access error occurs.
See Also:
  `Statement.executeQuery(java.lang.String)`

#### executeUpdate

    public int executeUpdate​(java.lang.String sql)
                      throws VirtuosoException

Executes an SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Parameters:
  `sql` - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
  either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing
Throws:
  `VirtuosoException` - if a database access error occurs
See Also:
  `Statement.executeUpdate(java.lang.String)`

#### getMaxFieldSize

    public int getMaxFieldSize​()
                        throws VirtuosoException

Returns the maximum number of bytes allowed for any column value. This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.

Specified by:
  `getMaxFieldSize` in interface `java.sql.Statement`
Returns:
  int The current max column size limit; zero means unlimited
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getMaxFieldSize()`

#### getMaxRows

    public int getMaxRows​()
                   throws VirtuosoException

Retrieves the maximum number of rows that a VirtuosoResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
  `getMaxRows` in interface `java.sql.Statement`
Returns:
  int The current max row limit; zero means unlimited.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getMaxRows()`

#### getMoreResults

    public boolean getMoreResults​()
                           throws VirtuosoException

Moves to a Statement's next result. It returns true if this result is a ResultSet. This method also implicitly closes any current ResultSet obtained with getResultSet. There are no more results when (!getMoreResults() && (getUpdateCount() == -1)

Specified by:
  `getMoreResults` in interface `java.sql.Statement`
Returns:
  true if the next result is a ResultSet; false if it is an update count or there are no more results
Throws:
  `VirtuosoException` - if a database access error occurs
See Also:
  `getResultSet()`, `execute(java.lang.String)`, `Statement.getMoreResults()`

#### getQueryTimeout

    public int getQueryTimeout​()
                        throws VirtuosoException

Retrieves the number of seconds the driver will new wait for a Statement to execute. If the limit is exceeded, a VirtuosoException is thrown.

Specified by:
  `getQueryTimeout` in interface `java.sql.Statement`
Returns:
  int The current query timeout limit in seconds; zero means unlimited.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getQueryTimeout()`

#### getResultSet

    public java.sql.ResultSet getResultSet​()
                                    throws VirtuosoException

Returns the current result as a VirtuosoResultSet object. This method should be called only once per result.

Specified by:
  `getResultSet` in interface `java.sql.Statement`
Returns:
  the current result as a ResultSet; null if the result is an update count or there are no more results
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `getResultSet()`, `execute(java.lang.String)`, `Statement.getResultSet()`

#### getUpdateCount

    public int getUpdateCount​()
                       throws VirtuosoException

Returns the current result as an update count; if the result is a ResultSet or there are no more results, -1 is returned. This method should be called only once per result.

Specified by:
  `getUpdateCount` in interface `java.sql.Statement`
Returns:
  the current result as an update count; -1 if it is a ResultSet or there are no more results
Throws:
  `VirtuosoException` - if a database access error occurs
See Also:
  `execute(java.lang.String)`

#### getWarnings

    public java.sql.SQLWarning getWarnings​()
                                    throws VirtuosoException

Retrieves the first warning reported by calls on this Statement. Subsequent Statement warnings will be chained to this SQLWarning. Virtuoso does not generate warnings, so this function will return always null.

Specified by:
  `getWarnings` in interface `java.sql.Statement`
Returns:
  SQLWarning The first SQLWarning or null (must be null for the moment)
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getWarnings()`

#### setMaxFieldSize

    public void setMaxFieldSize​(int max)
                         throws VirtuosoException

Sets the limit for the maximum number of bytes in a column to the given number of bytes. This is the maximum number of bytes that can be returned for any column value. This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.

Specified by:
  `setMaxFieldSize` in interface `java.sql.Statement`
Parameters:
  `max` - The new max column size limit; zero means unlimited
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.setMaxFieldSize(int)`

#### setMaxRows

    public void setMaxRows​(int max)
                    throws VirtuosoException

Sets the limit for the maximum number of rows that any VirtuosoResultSet can contain to the given number. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
  `setMaxRows` in interface `java.sql.Statement`
Parameters:
  `max` - The new max rows limit; zero means unlimited
Throws:
  `VirtuosoException` - An internal error occurred.
See Also:
  `Statement.setMaxRows(int)`

#### setQueryTimeout

    public void setQueryTimeout​(int seconds)
                         throws VirtuosoException

Sets the number of seconds the driver will new wait for a Statement to execute to the given number of seconds. If the limit is exceeded, a VirtuosoException is thrown.

Specified by:
  `setQueryTimeout` in interface `java.sql.Statement`
Parameters:
  `seconds` - the new query timeout limit in seconds; zero means. unlimited
Throws:
  `VirtuosoException` - An internal error occurred.
See Also:
  `Statement.setQueryTimeout(int)`

#### getConnection

    public java.sql.Connection getConnection​()
                                      throws VirtuosoException

Returns the VirtuosoConnection object that produced this VirtuosoStatement object.

Specified by:
  `getConnection` in interface `java.sql.Statement`
Returns:
  Connection The connection that produced this statement
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getConnection()`

#### getFetchDirection

    public int getFetchDirection​()
                          throws VirtuosoException

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

Specified by:
  `getFetchDirection` in interface `java.sql.Statement`
Returns:
  int The default fetch direction for result sets generated from this VirtuosoStatement object.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getFetchDirection()`

#### getFetchSize

    public int getFetchSize​()
                     throws VirtuosoException

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

Specified by:
  `getFetchSize` in interface `java.sql.Statement`
Returns:
  int The default fetch size for result sets generated from this Statement object.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.getFetchSize()`

#### getResultSetConcurrency

    public int getResultSetConcurrency​()
                                throws VirtuosoException

Returns the result set concurrency.

Specified by:
  `getResultSetConcurrency` in interface `java.sql.Statement`
Returns:
  int The result set concurrency.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `ResultSet`, `Statement.getResultSetConcurrency()`

#### getResultSetType

    public int getResultSetType​()
                         throws VirtuosoException

Returns the result set type.

Specified by:
  `getResultSetType` in interface `java.sql.Statement`
Returns:
  int The result set type.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `ResultSet`, `Statement.getResultSetType()`

#### setFetchDirection

    public void setFetchDirection​(int direction)
                           throws VirtuosoException

Sets the default fetch direction for result sets generated by this VirtuosoStatement object. Each result set has its own methods for getting and setting its own fetch direction.

Specified by:
  `setFetchDirection` in interface `java.sql.Statement`
Parameters:
  `direction` - the initial direction for processing rows
Throws:
  `VirtuosoException` - An internal error occurred.
See Also:
  `Statement.setFetchDirection(int)`

#### setFetchSize

    public void setFetchSize​(int rows)
                      throws VirtuosoException

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.

Specified by:
  `setFetchSize` in interface `java.sql.Statement`
Parameters:
  `rows` - the number of rows to fetch
Throws:
  `VirtuosoException` - An internal error occurred.
See Also:
  `Statement.setFetchSize(int)`

#### setCursorName

    public void setCursorName​(java.lang.String name)
                       throws VirtuosoException

Defines the SQL cursor name that will be used by subsequent Statement `execute` methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database does not support positioned update/delete, this method is a noop. To insure that a cursor has the proper isolation level to support updates, the cursor's SELECT statement should be of the form 'select for update ...'. If the 'for update' phrase is omitted, positioned updates may fail.

Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a connection.

Specified by:
  `setCursorName` in interface `java.sql.Statement`
Parameters:
  `name` - the new cursor name, which must be unique within a connection
Throws:
  `VirtuosoException` - if a database access error occurs

#### addBatch

    public void addBatch​(java.lang.String sql)
                  throws VirtuosoException

Adds a SQL command to the current batch of commands for the statement.

Specified by:
  `addBatch` in interface `java.sql.Statement`
Parameters:
  `sql` - typically this is a static SQL INSERT or UPDATE statement
Throws:
  `VirtuosoException` - if a database access error occurs

#### clearBatch

    public void clearBatch​()
                    throws VirtuosoException

Makes the set of commands in the current batch empty.

Specified by:
  `clearBatch` in interface `java.sql.Statement`
Throws:
  `VirtuosoException` - if a database access error occurs

#### executeBatch

    public int[] executeBatch​()
                       throws java.sql.BatchUpdateException

Submits a batch of commands to the database for execution.

Specified by:
  `executeBatch` in interface `java.sql.Statement`
Returns:
  an array of update counts containing one element for each command in the batch. The array is ordered according to the order in which commands were inserted into the batch.
Throws:
  `java.sql.BatchUpdateException` - if a database access error occurs

#### setEscapeProcessing

    public void setEscapeProcessing​(boolean enable)
                             throws VirtuosoException

Toggles on and off escape substitution before sending SQL to the database.

Specified by:
  `setEscapeProcessing` in interface `java.sql.Statement`
Parameters:
  `enable` - Indicate whether to enable or disable escape processing.
Throws:
  `VirtuosoException` - No errors returned (just an implementation question).
See Also:
  `Statement.setEscapeProcessing(boolean)`

#### getExecType

    public int getExecType​()

Returns the type of executing query.

Returns:
  the type of query

#### isClosed

    public boolean isClosed​()
                     throws java.sql.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 `java.sql.Statement`
Returns:
  true if this `Statement` object is closed; false if it is still open
Throws:
  `java.sql.SQLException` - if a database access error occurs
Since:
  1.6

#### getMoreResults

    public boolean getMoreResults​(int current)
                           throws java.sql.SQLException

Specified by:
  `getMoreResults` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getGeneratedKeys

    public java.sql.ResultSet getGeneratedKeys​()
                                        throws java.sql.SQLException

Specified by:
  `getGeneratedKeys` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate​(java.lang.String sql,
                             int autoGeneratedKeys)
                      throws java.sql.SQLException

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate​(java.lang.String sql,
                             int[] columnIndexes)
                      throws java.sql.SQLException

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate​(java.lang.String sql,
                             java.lang.String[] columnNames)
                      throws java.sql.SQLException

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute​(java.lang.String sql,
                           int autoGeneratedKeys)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute​(java.lang.String sql,
                           int[] columnIndexes)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute​(java.lang.String sql,
                           java.lang.String[] columnNames)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getResultSetHoldability

    public int getResultSetHoldability​()
                                throws java.sql.SQLException

Specified by:
  `getResultSetHoldability` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### notify_error

    protected void notify_error​(java.lang.Throwable e)
                         throws VirtuosoException

Throws:
  `VirtuosoException`

#### setPoolable

    public void setPoolable​(boolean poolable)
                     throws java.sql.SQLException

Requests that a `Statement` be pooled or not pooled. The value specified is a hint to the statement pool implementation indicating whether the applicaiton wants the statement to be pooled. It is up to the statement pool manager as to whether the hint is used.

The poolable value of a statement is applicable to both internal statement caches implemented by the driver and external statement caches implemented by application servers and other applications.

By default, a `Statement` is not poolable when created, and a `PreparedStatement` and `CallableStatement` are poolable when created.

Specified by:
  `setPoolable` in interface `java.sql.Statement`
Parameters:
  `poolable` - requests that the statement be pooled if true and that the statement not be pooled if false

Throws:
  `java.sql.SQLException` - if this method is called on a closed `Statement`

Since:
  1.6

#### isPoolable

    public boolean isPoolable​()
                       throws java.sql.SQLException

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

Specified by:
  `isPoolable` in interface `java.sql.Statement`
Returns:
  `true` if the `Statement` is poolable; `false` otherwise

Throws:
  `java.sql.SQLException` - if this method is called on a closed `Statement`

Since:
  1.6

See Also:
  `setPoolable(boolean)`

#### unwrap

    public <T> T unwrap​(java.lang.Class<T> iface)
                 throws java.sql.SQLException

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling `unwrap` recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an `SQLException` is thrown.

Specified by:
  `unwrap` in interface `java.sql.Wrapper`
Parameters:
  `iface` - A Class defining an interface that the result must implement.
Returns:
  an object that implements the interface. May be a proxy for the actual implementing object.
Throws:
  `java.sql.SQLException` - If no object found that implements the interface
Since:
  1.6

#### isWrapperFor

    public boolean isWrapperFor​(java.lang.Class<?> iface)
                         throws java.sql.SQLException

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively calling `isWrapperFor` on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared to `unwrap` so that callers can use this method to avoid expensive `unwrap` calls that may fail. If this method returns true then calling `unwrap` with the same argument should succeed.

Specified by:
  `isWrapperFor` in interface `java.sql.Wrapper`
Parameters:
  `iface` - a Class defining an interface.
Returns:
  true if this implements the interface or directly or indirectly wraps an object that does.
Throws:
  `java.sql.SQLException` - if an error occurs while determining whether this is a wrapper for an object with the given interface.
Since:
  1.6

#### closeOnCompletion

    public void closeOnCompletion​()
                           throws java.sql.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.

Note: Multiple calls to `closeOnCompletion` do not toggle the effect on this `Statement`. However, a call to `closeOnCompletion` does effect both the subsequent execution of statements, and statements that currently have open, dependent, result sets.

Specified by:
  `closeOnCompletion` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException` - if this method is called on a closed `Statement`
Since:
  1.7

#### isCloseOnCompletion

    public boolean isCloseOnCompletion​()
                                throws java.sql.SQLException

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

Specified by:
  `isCloseOnCompletion` in interface `java.sql.Statement`
Returns:
  `true` if the `Statement` will be closed when all of its dependent result sets are closed; `false` otherwise
Throws:
  `java.sql.SQLException` - if this method is called on a closed `Statement`
Since:
  1.7