java.sql.SQLType Java Examples
The following examples show how to use
java.sql.SQLType.
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: UpdatableResultSet.java From lams with GNU General Public License v2.0 | 6 votes |
/** * Internal setObject implementation. * * @param columnIndex * @param x * @param targetType * @param scaleOrLength * @throws SQLException */ protected void updateObjectInternal(int columnIndex, Object x, SQLType targetType, int scaleOrLength) throws SQLException { synchronized (checkClosed().getConnectionMutex()) { if (!this.onInsertRow) { if (!this.doingUpdates) { this.doingUpdates = true; syncUpdate(); } if (targetType == null) { this.updater.setObject(columnIndex, x); } else { this.updater.setObject(columnIndex, x, targetType); } } else { if (targetType == null) { this.inserter.setObject(columnIndex, x); } else { this.inserter.setObject(columnIndex, x, targetType); } this.thisRow.setBytes(columnIndex - 1, this.inserter.getBytesRepresentation(columnIndex - 1)); } } }
Example #2
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #3
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterName, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #4
Source File: CallableStatement.java From lams with GNU General Public License v2.0 | 5 votes |
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException { if (sqlType instanceof MysqlType) { registerOutParameter(parameterIndex, (MysqlType) sqlType, scale); } else { registerOutParameter(parameterIndex, sqlType.getVendorTypeNumber(), scale); } }
Example #5
Source File: CallableStatement.java From lams with GNU General Public License v2.0 | 5 votes |
public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException { if (sqlType instanceof MysqlType) { registerOutParameter(getNamedParamIndex(parameterName, true), (MysqlType) sqlType, scale); } else { registerOutParameter(getNamedParamIndex(parameterName, true), sqlType.getVendorTypeNumber(), scale); } }
Example #6
Source File: CallableStatement.java From lams with GNU General Public License v2.0 | 5 votes |
public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException { if (sqlType instanceof MysqlType) { registerOutParameter(getNamedParamIndex(parameterName, true), (MysqlType) sqlType, typeName); } else { registerOutParameter(parameterName, sqlType.getVendorTypeNumber(), typeName); } }
Example #7
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param typeName * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, typeName); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #8
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #9
Source File: ClientPreparedStatement.java From lams with GNU General Public License v2.0 | 5 votes |
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { synchronized (checkClosed().getConnectionMutex()) { if (targetSqlType instanceof MysqlType) { ((PreparedQuery<?>) this.query).getQueryBindings().setObject(getCoreParameterIndex(parameterIndex), x, (MysqlType) targetSqlType, scaleOrLength); } else { setObject(parameterIndex, x, targetSqlType.getVendorTypeNumber(), scaleOrLength); } } }
Example #10
Source File: ClientPreparedStatement.java From lams with GNU General Public License v2.0 | 5 votes |
public void setObject(int parameterIndex, Object parameterObj, SQLType targetSqlType) throws SQLException { synchronized (checkClosed().getConnectionMutex()) { if (targetSqlType instanceof MysqlType) { ((PreparedQuery<?>) this.query).getQueryBindings().setObject(getCoreParameterIndex(parameterIndex), parameterObj, (MysqlType) targetSqlType); } else { setObject(parameterIndex, parameterObj, targetSqlType.getVendorTypeNumber()); } } }
Example #11
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param sqlType * @param typeName * @throws SQLException */ public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterName, sqlType, typeName); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #12
Source File: MultiShardResultSet.java From elastic-db-tools-for-java with MIT License | 5 votes |
@Override public void updateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { this.getCurrentResultSet().updateObject(columnIndex, x, targetSqlType); }
Example #13
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterName, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #14
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #15
Source File: PreparedStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException { try { if (this.wrappedStmt != null) { ((PreparedStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #16
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #17
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param typeName * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, typeName); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #18
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #19
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterName, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #20
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param sqlType * @param typeName * @throws SQLException */ public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterName, sqlType, typeName); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #21
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #22
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ @Override public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #23
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterName, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #24
Source File: CallableStatementWrapper.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterName, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #25
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param x * @param targetSqlType * @throws SQLException */ public void setObject(String parameterName, Object x, SQLType targetSqlType) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterName, x, targetSqlType); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #26
Source File: JDBC42CallableStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterName * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).setObject(parameterName, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #27
Source File: JDBC42PreparedStatementWrapper.java From r-course with MIT License | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((PreparedStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #28
Source File: JDBC42PreparedStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */ public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { try { if (this.wrappedStmt != null) { ((PreparedStatement) this.wrappedStmt).setObject(parameterIndex, x, targetSqlType, scaleOrLength); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #29
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param typeName * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, typeName); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }
Example #30
Source File: JDBC42CallableStatementWrapper.java From Komondor with GNU General Public License v3.0 | 5 votes |
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param parameterIndex * @param sqlType * @param scale * @throws SQLException */ public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException { try { if (this.wrappedStmt != null) { ((CallableStatement) this.wrappedStmt).registerOutParameter(parameterIndex, sqlType, scale); } else { throw SQLError.createSQLException("No operations allowed after statement closed", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor); } } catch (SQLException sqlEx) { checkAndFireConnectionError(sqlEx); } }