Search in sources :

Example 1 with ResultSetFactory

use of com.mysql.cj.jdbc.result.ResultSetFactory in project ABC by RuiPinto96274.

the class StatementImpl method setResultSetConcurrency.

/**
 * Sets the concurrency for result sets generated by this statement
 *
 * @param concurrencyFlag
 *            concurrency flag
 * @throws SQLException
 *             if a database access error occurs or this method is called on a closed PreparedStatement
 */
void setResultSetConcurrency(int concurrencyFlag) throws SQLException {
    try {
        synchronized (checkClosed().getConnectionMutex()) {
            this.resultSetConcurrency = concurrencyFlag;
            // updating resultset factory because concurrency is cached there
            this.resultSetFactory = new ResultSetFactory(this.connection, this);
        }
    } catch (StatementIsClosedException e) {
    // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement...
    }
}
Also used : ResultSetFactory(com.mysql.cj.jdbc.result.ResultSetFactory) StatementIsClosedException(com.mysql.cj.exceptions.StatementIsClosedException)

Example 2 with ResultSetFactory

use of com.mysql.cj.jdbc.result.ResultSetFactory in project aws-mysql-jdbc by awslabs.

the class StatementImpl method setResultSetConcurrency.

/**
 * Sets the concurrency for result sets generated by this statement
 *
 * @param concurrencyFlag
 *            concurrency flag
 * @throws SQLException
 *             if a database access error occurs or this method is called on a closed PreparedStatement
 */
void setResultSetConcurrency(int concurrencyFlag) throws SQLException {
    try {
        synchronized (checkClosed().getConnectionMutex()) {
            this.resultSetConcurrency = concurrencyFlag;
            // updating resultset factory because concurrency is cached there
            this.resultSetFactory = new ResultSetFactory(this.connection, this);
        }
    } catch (StatementIsClosedException e) {
    // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement...
    }
}
Also used : ResultSetFactory(com.mysql.cj.jdbc.result.ResultSetFactory) StatementIsClosedException(com.mysql.cj.exceptions.StatementIsClosedException)

Example 3 with ResultSetFactory

use of com.mysql.cj.jdbc.result.ResultSetFactory in project aws-mysql-jdbc by awslabs.

the class StatementImpl method setResultSetType.

/**
 * Sets the result set type for result sets generated by this statement
 *
 * @param typeFlag
 *            {@link com.mysql.cj.protocol.Resultset.Type}
 * @throws SQLException
 *             if a database access error occurs or this method is called on a closed PreparedStatement
 */
void setResultSetType(Resultset.Type typeFlag) throws SQLException {
    try {
        synchronized (checkClosed().getConnectionMutex()) {
            this.query.setResultType(typeFlag);
            // updating resultset factory because type is cached there
            this.resultSetFactory = new ResultSetFactory(this.connection, this);
        }
    } catch (StatementIsClosedException e) {
    // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement...
    }
}
Also used : ResultSetFactory(com.mysql.cj.jdbc.result.ResultSetFactory) StatementIsClosedException(com.mysql.cj.exceptions.StatementIsClosedException)

Example 4 with ResultSetFactory

use of com.mysql.cj.jdbc.result.ResultSetFactory in project JavaSegundasQuintas by ecteruel.

the class StatementImpl method setResultSetConcurrency.

/**
 * Sets the concurrency for result sets generated by this statement
 *
 * @param concurrencyFlag
 *            concurrency flag
 * @throws SQLException
 *             if a database access error occurs or this method is called on a closed PreparedStatement
 */
void setResultSetConcurrency(int concurrencyFlag) throws SQLException {
    try {
        synchronized (checkClosed().getConnectionMutex()) {
            this.resultSetConcurrency = concurrencyFlag;
            // updating resultset factory because concurrency is cached there
            this.resultSetFactory = new ResultSetFactory(this.connection, this);
        }
    } catch (StatementIsClosedException e) {
    // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement...
    }
}
Also used : ResultSetFactory(com.mysql.cj.jdbc.result.ResultSetFactory) StatementIsClosedException(com.mysql.cj.exceptions.StatementIsClosedException)

Example 5 with ResultSetFactory

use of com.mysql.cj.jdbc.result.ResultSetFactory in project JavaSegundasQuintas by ecteruel.

the class StatementImpl method setResultSetType.

/**
 * Sets the result set type for result sets generated by this statement
 *
 * @param typeFlag
 *            {@link com.mysql.cj.protocol.Resultset.Type}
 * @throws SQLException
 *             if a database access error occurs or this method is called on a closed PreparedStatement
 */
void setResultSetType(Resultset.Type typeFlag) throws SQLException {
    try {
        synchronized (checkClosed().getConnectionMutex()) {
            this.query.setResultType(typeFlag);
            // updating resultset factory because type is cached there
            this.resultSetFactory = new ResultSetFactory(this.connection, this);
        }
    } catch (StatementIsClosedException e) {
    // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement...
    }
}
Also used : ResultSetFactory(com.mysql.cj.jdbc.result.ResultSetFactory) StatementIsClosedException(com.mysql.cj.exceptions.StatementIsClosedException)

Aggregations

StatementIsClosedException (com.mysql.cj.exceptions.StatementIsClosedException)6 ResultSetFactory (com.mysql.cj.jdbc.result.ResultSetFactory)6