Java Code Examples for com.mysql.cj.jdbc.exceptions.SQLError#createSQLFeatureNotSupportedException()

The following examples show how to use com.mysql.cj.jdbc.exceptions.SQLError#createSQLFeatureNotSupportedException() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Deprecated
@Override
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
    checkClosed();

    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 2
@Override
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
    try {
        MysqlType mt = MysqlType.getByJdbcType(sqlType);
        registerOutParameter(parameterIndex, mt);
    } catch (FeatureNotAvailableException nae) {
        throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("Statement.UnsupportedSQLType") + JDBCType.valueOf(sqlType),
                MysqlErrorNumbers.SQL_STATE_DRIVER_NOT_CAPABLE, getExceptionInterceptor());
    }
}
 
Example 3
public void setObject(int parameterIndex, Object parameterObj, int targetSqlType, int scale) throws SQLException {
    synchronized (checkClosed().getConnectionMutex()) {
        try {
            ((PreparedQuery<?>) this.query).getQueryBindings().setObject(getCoreParameterIndex(parameterIndex), parameterObj,
                    MysqlType.getByJdbcType(targetSqlType), scale);
        } catch (FeatureNotAvailableException nae) {
            throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("Statement.UnsupportedSQLType") + JDBCType.valueOf(targetSqlType),
                    MysqlErrorNumbers.SQL_STATE_DRIVER_NOT_CAPABLE, this.exceptionInterceptor);
        }
    }
}
 
Example 4
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
    try {
        MysqlType mt = MysqlType.getByJdbcType(sqlType);
        registerOutParameter(parameterIndex, mt);
    } catch (FeatureNotAvailableException nae) {
        throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("Statement.UnsupportedSQLType") + JDBCType.valueOf(sqlType),
                MysqlErrorNumbers.SQL_STATE_DRIVER_NOT_CAPABLE, getExceptionInterceptor());
    }
}
 
Example 5
/**
 * Internal setObject implementation. Although targetType is not part of default ResultSet methods signatures, it is used for type conversions from
 * JDBC42UpdatableResultSet new JDBC 4.2 updateObject() methods.
 * 
 * @param columnIndex
 * @param x
 * @param targetType
 * @param scaleOrLength
 * @throws SQLException
 */
protected void updateObjectInternal(int columnIndex, Object x, Integer targetType, int scaleOrLength) throws SQLException {
    try {
        MysqlType targetMysqlType = targetType == null ? null : MysqlType.getByJdbcType(targetType);
        updateObjectInternal(columnIndex, x, targetMysqlType, scaleOrLength);

    } catch (FeatureNotAvailableException nae) {
        throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("Statement.UnsupportedSQLType") + JDBCType.valueOf(targetType),
                MysqlErrorNumbers.SQL_STATE_DRIVER_NOT_CAPABLE, getExceptionInterceptor());
    }
}
 
Example 6
public void setArray(int i, Array x) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 7
@Override
public Array getArray(int columnIndex) throws SQLException {
    checkRowPos();
    checkColumnBounds(columnIndex);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 8
@Override
public void updateRef(String columnLabel, Ref arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 9
@Override
public int getHoldability() throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 10
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 11
@Override
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 12
@Override
public OutputStream setBinaryStream(long indexToWriteAt) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 13
@Override
public void updateArray(int columnIndex, Array arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 14
@Override
public java.sql.Ref getRef(int i) throws SQLException {
    checkColumnBounds(i);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 15
@Override
public void updateRef(int columnIndex, Ref arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 16
Source Project: lams   File: ResultSetImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Array getArray(int columnIndex) throws SQLException {
    checkRowPos();
    checkColumnBounds(columnIndex);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 17
Source Project: lams   File: ResultSetImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public java.sql.Ref getRef(int i) throws SQLException {
    checkColumnBounds(i);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 18
@Override
public RowId getRowId(String columnLabel) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 19
@Override
public boolean rowUpdated() throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 20
/**
 * Internal setObject implementation. Although targetType is not part of default ResultSet methods signatures, it is used for type conversions from
 * JDBC42UpdatableResultSet new JDBC 4.2 updateObject() methods.
 * 
 * @param columnIndex
 *            column index
 * @param x
 *            value
 * @param targetType
 *            target type
 * @param scaleOrLength
 *            scale or length, depending on target type
 * @throws SQLException
 *             if an error occurs
 */
protected void updateObjectInternal(int columnIndex, Object x, Integer targetType, int scaleOrLength) throws SQLException {
    try {
        MysqlType targetMysqlType = targetType == null ? null : MysqlType.getByJdbcType(targetType);
        updateObjectInternal(columnIndex, x, targetMysqlType, scaleOrLength);

    } catch (FeatureNotAvailableException nae) {
        throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("Statement.UnsupportedSQLType") + JDBCType.valueOf(targetType),
                MysqlErrorNumbers.SQL_STATE_DRIVER_NOT_CAPABLE, getExceptionInterceptor());
    }
}