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() . 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
Source File: CallableStatement.java    From FoxTelem with GNU General Public License v3.0 5 votes vote down vote up
@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 2
Source File: ClientPreparedStatement.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
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 3
Source File: CallableStatement.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
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 4
Source File: UpdatableResultSet.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 5
Source File: ServerPreparedStatement.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Deprecated
@Override
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
    checkClosed();

    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 6
Source File: ConnectionImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 7
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean rowUpdated() throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 8
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public RowId getRowId(String columnLabel) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 9
Source File: ResultSetImpl.java    From lams with 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 10
Source File: ResultSetImpl.java    From lams with 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 11
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void updateRef(int columnIndex, Ref arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 12
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public java.sql.Ref getRef(int i) throws SQLException {
    checkColumnBounds(i);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 13
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void updateArray(int columnIndex, Array arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 14
Source File: BlobFromLocator.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public OutputStream setBinaryStream(long indexToWriteAt) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 15
Source File: ConnectionImpl.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 16
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getHoldability() throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 17
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void updateRef(String columnLabel, Ref arg1) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 18
Source File: ResultSetImpl.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Array getArray(int columnIndex) throws SQLException {
    checkRowPos();
    checkColumnBounds(columnIndex);
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 19
Source File: ClientPreparedStatement.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void setArray(int i, Array x) throws SQLException {
    throw SQLError.createSQLFeatureNotSupportedException();
}
 
Example 20
Source File: UpdatableResultSet.java    From FoxTelem with GNU General Public License v3.0 3 votes vote down vote up
/**
 * 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());
    }
}