public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException { // ignore scale for now registerOutParameter(parameterIndex, sqlType ); } }
public int getParameterMode(int param) throws SQLException { checkParamIndex(param); return ParameterMetaData.parameterModeIn; }
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { return getColumns(3, catalog, schemaPattern, tableNamePattern, columnNamePattern); }
/** * Removes the given <code>Savepoint</code> object from the current * transaction. Any reference to the savepoint after it have been removed * will cause an <code>SQLException</code> to be thrown. * * @param savepoint the <code>Savepoint</code> object to be removed * @exception SQLException if a database access error occurs or * the given <code>Savepoint</code> object is not a valid * savepoint in the current transaction * @since 1.4 */ public void releaseSavepoint(Savepoint savepoint) throws SQLException { checkClosed(); if (!haveMinimumServerVersion("8.0")) throw new PSQLException(GT.tr("Server versions prior to 8.0 do not support savepoints."), PSQLState.NOT_IMPLEMENTED); PSQLSavepoint pgSavepoint = (PSQLSavepoint)savepoint; execSQLUpdate("RELEASE SAVEPOINT " + pgSavepoint.getPGName()); pgSavepoint.invalidate(); }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); return prepareCall(sql, resultSetType, resultSetConcurrency, getHoldability()); }
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); return prepareStatement(sql, resultSetType, resultSetConcurrency, getHoldability()); }
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); return createStatement(resultSetType, resultSetConcurrency, getHoldability()); }
/** * Executes the given SQL statement and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. The driver will ignore the array if the SQL statement * is not an <code>INSERT</code> statement. * * @param sql an SQL <code>INSERT</code>, <code>UPDATE</code> or * <code>DELETE</code> statement or an SQL statement that returns nothing * @param columnNames an array of the names of the columns that should be * returned from the inserted row * @return either the row count for <code>INSERT</code>, <code>UPDATE</code>, * or <code>DELETE</code> statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs * * @since 1.4 */ public int executeUpdate(String sql, String columnNames[]) throws SQLException { if (columnNames == null || columnNames.length == 0) return executeUpdate(sql); sql = addReturning(connection, sql, columnNames, true); wantsGeneratedKeysOnce = true; return executeUpdate(sql); }
/** * Updates the designated column with a <code>java.sql.Array</code> value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the <code>updateRow</code> or * <code>insertRow</code> methods are called to update the database. * * @param columnName the name of the column * @param x the new column value * @exception SQLException if a database access error occurs * @since 1.4 */ public void updateArray(String columnName, java.sql.Array x) throws SQLException { updateArray(findColumn(columnName), x); }
protected Object internalGetObject(int columnIndex, Field field) throws SQLException { switch (getSQLType(columnIndex)) { case Types.BOOLEAN: return new Boolean(getBoolean(columnIndex)); default: return super.internalGetObject(columnIndex, field); } }
/** * Updates the designated column with a <code>java.sql.Array</code> value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the <code>updateRow</code> or * <code>insertRow</code> methods are called to update the database. * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @exception SQLException if a database access error occurs * @since 1.4 */ public void updateArray(int columnIndex, java.sql.Array x) throws SQLException { updateObject(columnIndex, x); }
/** * Writes the given array of bytes to the <code>BLOB</code> value that * this <code>Blob</code> object represents, starting at position * <code>pos</code>, and returns the number of bytes written. * * @param pos the position in the <code>BLOB</code> object at which * to start writing * @param bytes the array of bytes to be written to the <code>BLOB</code> * value that this <code>Blob</code> object represents * @return the number of bytes written * @exception SQLException if there is an error accessing the * <code>BLOB</code> value * @see #getBytes * @since 1.4 */ public synchronized int setBytes(long pos, byte[] bytes) throws SQLException { return setBytes(pos, bytes, 0, bytes.length); }
public ResultSet getSchemas() throws SQLException { return getSchemas(3, null, null); }
/** * Retrieves the current holdability of <code>ResultSet</code> objects * created using this <code>Connection</code> object. * * @return the holdability, one of * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> * @throws SQLException if a database access occurs * @see #setHoldability * @see ResultSet * @since 1.4 */ public int getHoldability() throws SQLException { checkClosed(); return rsHoldability; }
/** * Executes the given SQL statement and signals the driver with the * given flag about whether the * auto-generated keys produced by this <code>Statement</code> object * should be made available for retrieval. * * @param sql must be an SQL <code>INSERT</code>, <code>UPDATE</code> or * <code>DELETE</code> statement or an SQL statement that * returns nothing * @param autoGeneratedKeys a flag indicating whether auto-generated keys * should be made available for retrieval; * one of the following constants: * <code>Statement.RETURN_GENERATED_KEYS</code> * <code>Statement.NO_GENERATED_KEYS</code> * @return either the row count for <code>INSERT</code>, <code>UPDATE</code> * or <code>DELETE</code> statements, or <code>0</code> for SQL * statements that return nothing * @exception SQLException if a database access error occurs, the given * SQL statement returns a <code>ResultSet</code> object, or * the given constant is not one of those allowed * @since 1.4 */ public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { if (autoGeneratedKeys == Statement.NO_GENERATED_KEYS) return executeUpdate(sql); sql = addReturning(connection, sql, new String[]{"*"}, false); wantsGeneratedKeysOnce = true; return executeUpdate(sql); }
public int getPrecision(int param) throws SQLException { checkParamIndex(param); return 0; }
public int getScale(int param) throws SQLException { checkParamIndex(param); return 0; }
public int isNullable(int param) throws SQLException { checkParamIndex(param); return ParameterMetaData.parameterNullableUnknown; }
public boolean isSigned(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().isSigned(_oids[param-1]); }
public String getParameterClassName(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getJavaClass(_oids[param-1]); }