diff options
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc3')
15 files changed, 2581 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Blob.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Blob.java new file mode 100644 index 0000000000..d293c7acf0 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Blob.java @@ -0,0 +1,90 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public abstract class AbstractJdbc3Blob extends org.postgresql.jdbc2.AbstractJdbc2Blob +{ + + public AbstractJdbc3Blob(org.postgresql.PGConnection conn, int oid) throws SQLException + { + super(conn, oid); + } + + /** + * 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 int setBytes(long pos, byte[] bytes) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Writes all or part of the given <code>byte</code> array to the + * <code>BLOB</code> value that this <code>Blob</code> object represents + * and returns the number of bytes written. + * Writing starts at position <code>pos</code> in the <code>BLOB</code> + * value; <code>len</code> bytes from the given byte array are 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 this <code>BLOB</code> + * object + * @param offset the offset into the array <code>bytes</code> at which + * to start reading the bytes to be set + * @param len the number of bytes to be written to the <code>BLOB</code> + * value from the array of bytes <code>bytes</code> + * @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 int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a stream that can be used to write to the <code>BLOB</code> + * value that this <code>Blob</code> object represents. The stream begins + * at position <code>pos</code>. + * + * @param pos the position in the <code>BLOB</code> value at which + * to start writing + * @return a <code>java.io.OutputStream</code> object to which data can + * be written + * @exception SQLException if there is an error accessing the + * <code>BLOB</code> value + * @see #getBinaryStream + * @since 1.4 + */ + public java.io.OutputStream setBinaryStream(long pos) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Truncates the <code>BLOB</code> value that this <code>Blob</code> + * object represents to be <code>len</code> bytes in length. + * + * @param len the length, in bytes, to which the <code>BLOB</code> value + * that this <code>Blob</code> object represents should be truncated + * @exception SQLException if there is an error accessing the + * <code>BLOB</code> value + * @since 1.4 + */ + public void truncate(long len) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Clob.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Clob.java new file mode 100644 index 0000000000..525530b537 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Clob.java @@ -0,0 +1,107 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public abstract class AbstractJdbc3Clob extends org.postgresql.jdbc2.AbstractJdbc2Clob +{ + + public AbstractJdbc3Clob(org.postgresql.PGConnection conn, int oid) throws SQLException + { + super(conn, oid); + } + + /** + * Writes the given Java <code>String</code> to the <code>CLOB</code> + * value that this <code>Clob</code> object designates at the position + * <code>pos</code>. + * + * @param pos the position at which to start writing to the <code>CLOB</code> + * value that this <code>Clob</code> object represents + * @param str the string to be written to the <code>CLOB</code> + * value that this <code>Clob</code> designates + * @return the number of characters written + * @exception SQLException if there is an error accessing the + * <code>CLOB</code> value + * + * @since 1.4 + */ + public int setString(long pos, String str) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Writes <code>len</code> characters of <code>str</code>, starting + * at character <code>offset</code>, to the <code>CLOB</code> value + * that this <code>Clob</code> represents. + * + * @param pos the position at which to start writing to this + * <code>CLOB</code> object + * @param str the string to be written to the <code>CLOB</code> + * value that this <code>Clob</code> object represents + * @param offset the offset into <code>str</code> to start reading + * the characters to be written + * @param len the number of characters to be written + * @return the number of characters written + * @exception SQLException if there is an error accessing the + * <code>CLOB</code> value + * + * @since 1.4 + */ + public int setString(long pos, String str, int offset, int len) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a stream to be used to write Ascii characters to the + * <code>CLOB</code> value that this <code>Clob</code> object represents, + * starting at position <code>pos</code>. + * + * @param pos the position at which to start writing to this + * <code>CLOB</code> object + * @return the stream to which ASCII encoded characters can be written + * @exception SQLException if there is an error accessing the + * <code>CLOB</code> value + * @see #getAsciiStream + * + * @since 1.4 + */ + public java.io.OutputStream setAsciiStream(long pos) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a stream to be used to write a stream of Unicode characters + * to the <code>CLOB</code> value that this <code>Clob</code> object + * represents, at position <code>pos</code>. + * + * @param pos the position at which to start writing to the + * <code>CLOB</code> value + * + * @return a stream to which Unicode encoded characters can be written + * @exception SQLException if there is an error accessing the + * <code>CLOB</code> value + * @see #getCharacterStream + * + * @since 1.4 + */ + public java.io.Writer setCharacterStream(long pos) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Truncates the <code>CLOB</code> value that this <code>Clob</code> + * designates to have a length of <code>len</code> + * characters. + * @param len the length, in bytes, to which the <code>CLOB</code> value + * should be truncated + * @exception SQLException if there is an error accessing the + * <code>CLOB</code> value + * + * @since 1.4 + */ + public void truncate(long len) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java new file mode 100644 index 0000000000..5988eddb4d --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java @@ -0,0 +1,369 @@ +package org.postgresql.jdbc3; + +import java.sql.*; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/AbstractJdbc3Connection.java,v 1.1 2002/08/14 20:35:39 barry Exp $ + * This class defines methods of the jdbc3 specification. This class extends + * org.postgresql.jdbc2.AbstractJdbc2Connection which provides the jdbc2 + * methods. The real Connection class (for jdbc3) is org.postgresql.jdbc3.Jdbc3Connection + */ +public abstract class AbstractJdbc3Connection extends org.postgresql.jdbc2.AbstractJdbc2Connection +{ + + /** + * Changes the holdability of <code>ResultSet</code> objects + * created using this <code>Connection</code> object to the given + * holdability. + * + * @param holdability a <code>ResultSet</code> holdability constant; one of + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @throws SQLException if a database access occurs, the given parameter + * is not a <code>ResultSet</code> constant indicating holdability, + * or the given holdability is not supported + * @see #getHoldability + * @see ResultSet + * @since 1.4 + */ + public void setHoldability(int holdability) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Creates an unnamed savepoint in the current transaction and + * returns the new <code>Savepoint</code> object that represents it. + * + * @return the new <code>Savepoint</code> object + * @exception SQLException if a database access error occurs + * or this <code>Connection</code> object is currently in + * auto-commit mode + * @see Savepoint + * @since 1.4 + */ + public Savepoint setSavepoint() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Creates a savepoint with the given name in the current transaction + * and returns the new <code>Savepoint</code> object that represents it. + * + * @param name a <code>String</code> containing the name of the savepoint + * @return the new <code>Savepoint</code> object + * @exception SQLException if a database access error occurs + * or this <code>Connection</code> object is currently in + * auto-commit mode + * @see Savepoint + * @since 1.4 + */ + public Savepoint setSavepoint(String name) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Undoes all changes made after the given <code>Savepoint</code> object + * was set. + * <P> + * This method should be used only when auto-commit has been disabled. + * + * @param savepoint the <code>Savepoint</code> object to roll back to + * @exception SQLException if a database access error occurs, + * the <code>Savepoint</code> object is no longer valid, + * or this <code>Connection</code> object is currently in + * auto-commit mode + * @see Savepoint + * @see #rollback + * @since 1.4 + */ + public void rollback(Savepoint savepoint) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Creates a <code>Statement</code> object that will generate + * <code>ResultSet</code> objects with the given type, concurrency, + * and holdability. + * This method is the same as the <code>createStatement</code> method + * above, but it allows the default result set + * type, concurrency, and holdability to be overridden. + * + * @param resultSetType one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.TYPE_FORWARD_ONLY</code>, + * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or + * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * @param resultSetConcurrency one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.CONCUR_READ_ONLY</code> or + * <code>ResultSet.CONCUR_UPDATABLE</code> + * @param resultSetHoldability one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @return a new <code>Statement</code> object that will generate + * <code>ResultSet</code> objects with the given type, + * concurrency, and holdability + * @exception SQLException if a database access error occurs + * or the given parameters are not <code>ResultSet</code> + * constants indicating type, concurrency, and holdability + * @see ResultSet + * @since 1.4 + */ + public Statement createStatement(int resultSetType, int resultSetConcurrency, + int resultSetHoldability) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Creates a <code>PreparedStatement</code> object that will generate + * <code>ResultSet</code> objects with the given type, concurrency, + * and holdability. + * <P> + * This method is the same as the <code>prepareStatement</code> method + * above, but it allows the default result set + * type, concurrency, and holdability to be overridden. + * + * @param sql a <code>String</code> object that is the SQL statement to + * be sent to the database; may contain one or more ? IN + * parameters + * @param resultSetType one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.TYPE_FORWARD_ONLY</code>, + * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or + * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * @param resultSetConcurrency one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.CONCUR_READ_ONLY</code> or + * <code>ResultSet.CONCUR_UPDATABLE</code> + * @param resultSetHoldability one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @return a new <code>PreparedStatement</code> object, containing the + * pre-compiled SQL statement, that will generate + * <code>ResultSet</code> objects with the given type, + * concurrency, and holdability + * @exception SQLException if a database access error occurs + * or the given parameters are not <code>ResultSet</code> + * constants indicating type, concurrency, and holdability + * @see ResultSet + * @since 1.4 + */ + public PreparedStatement prepareStatement(String sql, int resultSetType, + int resultSetConcurrency, int resultSetHoldability) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Creates a <code>CallableStatement</code> object that will generate + * <code>ResultSet</code> objects with the given type and concurrency. + * This method is the same as the <code>prepareCall</code> method + * above, but it allows the default result set + * type, result set concurrency type and holdability to be overridden. + * + * @param sql a <code>String</code> object that is the SQL statement to + * be sent to the database; may contain on or more ? parameters + * @param resultSetType one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.TYPE_FORWARD_ONLY</code>, + * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or + * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * @param resultSetConcurrency one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.CONCUR_READ_ONLY</code> or + * <code>ResultSet.CONCUR_UPDATABLE</code> + * @param resultSetHoldability one of the following <code>ResultSet</code> + * constants: + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @return a new <code>CallableStatement</code> object, containing the + * pre-compiled SQL statement, that will generate + * <code>ResultSet</code> objects with the given type, + * concurrency, and holdability + * @exception SQLException if a database access error occurs + * or the given parameters are not <code>ResultSet</code> + * constants indicating type, concurrency, and holdability + * @see ResultSet + * @since 1.4 + */ + public CallableStatement prepareCall(String sql, int resultSetType, + int resultSetConcurrency, + int resultSetHoldability) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + + /** + * Creates a default <code>PreparedStatement</code> object that has + * the capability to retrieve auto-generated keys. The given constant + * tells the driver whether it should make auto-generated keys + * available for retrieval. This parameter is ignored if the SQL + * statement is not an <code>INSERT</code> statement. + * <P> + * <B>Note:</B> This method is optimized for handling + * parametric SQL statements that benefit from precompilation. If + * the driver supports precompilation, + * the method <code>prepareStatement</code> will send + * the statement to the database for precompilation. Some drivers + * may not support precompilation. In this case, the statement may + * not be sent to the database until the <code>PreparedStatement</code> + * object is executed. This has no direct effect on users; however, it does + * affect which methods throw certain SQLExceptions. + * <P> + * Result sets created using the returned <code>PreparedStatement</code> + * object will by default be type <code>TYPE_FORWARD_ONLY</code> + * and have a concurrency level of <code>CONCUR_READ_ONLY</code>. + * + * @param sql an SQL statement that may contain one or more '?' IN + * parameter placeholders + * @param autoGeneratedKeys a flag indicating whether auto-generated keys + * should be returned; one of the following <code>Statement</code> + * constants: + * @param autoGeneratedKeys a flag indicating that auto-generated keys should be returned, one of + * <code>Statement.RETURN_GENERATED_KEYS</code> or + * <code>Statement.NO_GENERATED_KEYS</code>. + * @return a new <code>PreparedStatement</code> object, containing the + * pre-compiled SQL statement, that will have the capability of + * returning auto-generated keys + * @exception SQLException if a database access error occurs + * or the given parameter is not a <code>Statement</code> + * constant indicating whether auto-generated keys should be + * returned + * @since 1.4 + */ + public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Creates a default <code>PreparedStatement</code> object capable + * of returning the auto-generated keys designated by the given array. + * This array contains the indexes of the columns in the target + * table that contain the auto-generated keys that should be made + * available. This array is ignored if the SQL + * statement is not an <code>INSERT</code> statement. + * <P> + * An SQL statement with or without IN parameters can be + * pre-compiled and stored in a <code>PreparedStatement</code> object. This + * object can then be used to efficiently execute this statement + * multiple times. + * <P> + * <B>Note:</B> This method is optimized for handling + * parametric SQL statements that benefit from precompilation. If + * the driver supports precompilation, + * the method <code>prepareStatement</code> will send + * the statement to the database for precompilation. Some drivers + * may not support precompilation. In this case, the statement may + * not be sent to the database until the <code>PreparedStatement</code> + * object is executed. This has no direct effect on users; however, it does + * affect which methods throw certain SQLExceptions. + * <P> + * Result sets created using the returned <code>PreparedStatement</code> + * object will by default be type <code>TYPE_FORWARD_ONLY</code> + * and have a concurrency level of <code>CONCUR_READ_ONLY</code>. + * + * @param sql an SQL statement that may contain one or more '?' IN + * parameter placeholders + * @param columnIndexes an array of column indexes indicating the columns + * that should be returned from the inserted row or rows + * @return a new <code>PreparedStatement</code> object, containing the + * pre-compiled statement, that is capable of returning the + * auto-generated keys designated by the given array of column + * indexes + * @exception SQLException if a database access error occurs + * + * @since 1.4 + */ + public PreparedStatement prepareStatement(String sql, int columnIndexes[]) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Creates a default <code>PreparedStatement</code> object capable + * of returning the auto-generated keys designated by the given array. + * This array contains the names of the columns in the target + * table that contain the auto-generated keys that should be returned. + * This array is ignored if the SQL + * statement is not an <code>INSERT</code> statement. + * <P> + * An SQL statement with or without IN parameters can be + * pre-compiled and stored in a <code>PreparedStatement</code> object. This + * object can then be used to efficiently execute this statement + * multiple times. + * <P> + * <B>Note:</B> This method is optimized for handling + * parametric SQL statements that benefit from precompilation. If + * the driver supports precompilation, + * the method <code>prepareStatement</code> will send + * the statement to the database for precompilation. Some drivers + * may not support precompilation. In this case, the statement may + * not be sent to the database until the <code>PreparedStatement</code> + * object is executed. This has no direct effect on users; however, it does + * affect which methods throw certain SQLExceptions. + * <P> + * Result sets created using the returned <code>PreparedStatement</code> + * object will by default be type <code>TYPE_FORWARD_ONLY</code> + * and have a concurrency level of <code>CONCUR_READ_ONLY</code>. + * + * @param sql an SQL statement that may contain one or more '?' IN + * parameter placeholders + * @param columnNames an array of column names indicating the columns + * that should be returned from the inserted row or rows + * @return a new <code>PreparedStatement</code> object, containing the + * pre-compiled statement, that is capable of returning the + * auto-generated keys designated by the given array of column + * names + * @exception SQLException if a database access error occurs + * + * @since 1.4 + */ + public PreparedStatement prepareStatement(String sql, String columnNames[]) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + +} + + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3DatabaseMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3DatabaseMetaData.java new file mode 100644 index 0000000000..0c2e61d3a2 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3DatabaseMetaData.java @@ -0,0 +1,339 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public abstract class AbstractJdbc3DatabaseMetaData extends org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData +{ + + public AbstractJdbc3DatabaseMetaData(AbstractJdbc3Connection conn) + { + super(conn); + } + + + /** + * Retrieves whether this database supports savepoints. + * + * @return <code>true</code> if savepoints are supported; + * <code>false</code> otherwise + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public boolean supportsSavepoints() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves whether this database supports named parameters to callable + * statements. + * + * @return <code>true</code> if named parameters are supported; + * <code>false</code> otherwise + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public boolean supportsNamedParameters() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves whether it is possible to have multiple <code>ResultSet</code> objects + * returned from a <code>CallableStatement</code> object + * simultaneously. + * + * @return <code>true</code> if a <code>CallableStatement</code> object + * can return multiple <code>ResultSet</code> objects + * simultaneously; <code>false</code> otherwise + * @exception SQLException if a datanase access error occurs + * @since 1.4 + */ + public boolean supportsMultipleOpenResults() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves whether auto-generated keys can be retrieved after + * a statement has been executed. + * + * @return <code>true</code> if auto-generated keys can be retrieved + * after a statement has executed; <code>false</code> otherwise + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public boolean supportsGetGeneratedKeys() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a description of the user-defined type (UDT) hierarchies defined in a + * particular schema in this database. Only the immediate super type/ + * sub type relationship is modeled. + * <P> + * Only supertype information for UDTs matching the catalog, + * schema, and type name is returned. The type name parameter + * may be a fully-qualified name. When the UDT name supplied is a + * fully-qualified name, the catalog and schemaPattern parameters are + * ignored. + * <P> + * If a UDT does not have a direct super type, it is not listed here. + * A row of the <code>ResultSet</code> object returned by this method + * describes the designated UDT and a direct supertype. A row has the following + * columns: + * <OL> + * <LI><B>TYPE_CAT</B> String => the UDT's catalog (may be <code>null</code>) + * <LI><B>TYPE_SCHEM</B> String => UDT's schema (may be <code>null</code>) + * <LI><B>TYPE_NAME</B> String => type name of the UDT + * <LI><B>SUPERTYPE_CAT</B> String => the direct super type's catalog + * (may be <code>null</code>) + * <LI><B>SUPERTYPE_SCHEM</B> String => the direct super type's schema + * (may be <code>null</code>) + * <LI><B>SUPERTYPE_NAME</B> String => the direct super type's name + * </OL> + * + * <P><B>Note:</B> If the driver does not support type hierarchies, an + * empty result set is returned. + * + * @param catalog a catalog name; "" retrieves those without a catalog; + * <code>null</code> means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those + * without a schema + * @param typeNamePattern a UDT name pattern; may be a fully-qualified + * name + * @return a <code>ResultSet</code> object in which a row gives information + * about the designated UDT + * @throws SQLException if a database access error occurs + * @since 1.4 + */ + public ResultSet getSuperTypes(String catalog, String schemaPattern, + String typeNamePattern) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a description of the table hierarchies defined in a particular + * schema in this database. + * + * <P>Only supertable information for tables matching the catalog, schema + * and table name are returned. The table name parameter may be a fully- + * qualified name, in which case, the catalog and schemaPattern parameters + * are ignored. If a table does not have a super table, it is not listed here. + * Supertables have to be defined in the same catalog and schema as the + * sub tables. Therefore, the type description does not need to include + * this information for the supertable. + * + * <P>Each type description has the following columns: + * <OL> + * <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>) + * <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>) + * <LI><B>TABLE_NAME</B> String => type name + * <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name + * </OL> + * + * <P><B>Note:</B> If the driver does not support type hierarchies, an + * empty result set is returned. + * + * @param catalog a catalog name; "" retrieves those without a catalog; + * <code>null</code> means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those + * without a schema + * @param tableNamePattern a table name pattern; may be a fully-qualified + * name + * @return a <code>ResultSet</code> object in which each row is a type description + * @throws SQLException if a database access error occurs + * @since 1.4 + */ + public ResultSet getSuperTables(String catalog, String schemaPattern, + String tableNamePattern) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves a description of the given attribute of the given type + * for a user-defined type (UDT) that is available in the given schema + * and catalog. + * <P> + * Descriptions are returned only for attributes of UDTs matching the + * catalog, schema, type, and attribute name criteria. They are ordered by + * TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description + * does not contain inherited attributes. + * <P> + * The <code>ResultSet</code> object that is returned has the following + * columns: + * <OL> + * <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>) + * <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>) + * <LI><B>TYPE_NAME</B> String => type name + * <LI><B>ATTR_NAME</B> String => attribute name + * <LI><B>DATA_TYPE</B> short => attribute type SQL type from java.sql.Types + * <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name. + * For a UDT, the type name is fully qualified. For a REF, the type name is + * fully qualified and represents the target type of the reference type. + * <LI><B>ATTR_SIZE</B> int => column size. For char or date + * types this is the maximum number of characters; for numeric or + * decimal types this is precision. + * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits + * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2) + * <LI><B>NULLABLE</B> int => whether NULL is allowed + * <UL> + * <LI> attributeNoNulls - might not allow NULL values + * <LI> attributeNullable - definitely allows NULL values + * <LI> attributeNullableUnknown - nullability unknown + * </UL> + * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>) + * <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>) + * <LI><B>SQL_DATA_TYPE</B> int => unused + * <LI><B>SQL_DATETIME_SUB</B> int => unused + * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the + * maximum number of bytes in the column + * <LI><B>ORDINAL_POSITION</B> int => index of column in table + * (starting at 1) + * <LI><B>IS_NULLABLE</B> String => "NO" means column definitely + * does not allow NULL values; "YES" means the column might + * allow NULL values. An empty string means unknown. + * <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the + * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) + * <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the + * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) + * <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a + * reference attribute (<code>null</code> if the DATA_TYPE isn't REF) + * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated + * Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE + * isn't DISTINCT or user-generated REF) + * </OL> + * @param catalog a catalog name; must match the catalog name as it + * is stored in the database; "" retrieves those without a catalog; + * <code>null</code> means that the catalog name should not be used to narrow + * the search + * @param schemaPattern a schema name pattern; must match the schema name + * as it is stored in the database; "" retrieves those without a schema; + * <code>null</code> means that the schema name should not be used to narrow + * the search + * @param typeNamePattern a type name pattern; must match the + * type name as it is stored in the database + * @param attributeNamePattern an attribute name pattern; must match the attribute + * name as it is declared in the database + * @return a <code>ResultSet</code> object in which each row is an + * attribute description + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public ResultSet getAttributes(String catalog, String schemaPattern, + String typeNamePattern, String attributeNamePattern) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves whether this database supports the given result set holdability. + * + * @param holdability one of the following constants: + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code> + * @return <code>true</code> if so; <code>false</code> otherwise + * @exception SQLException if a database access error occurs + * @see Connection + * @since 1.4 + */ + public boolean supportsResultSetHoldability(int holdability) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the default holdability of this <code>ResultSet</code> + * object. + * + * @return the default holdability; either + * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public int getResultSetHoldability() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the major version number of the underlying database. + * + * @return the underlying database's major version + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public int getDatabaseMajorVersion() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the minor version number of the underlying database. + * + * @return underlying database's minor version + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public int getDatabaseMinorVersion() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the major JDBC version number for this + * driver. + * + * @return JDBC version major number + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public int getJDBCMajorVersion() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the minor JDBC version number for this + * driver. + * + * @return JDBC version minor number + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public int getJDBCMinorVersion() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Indicates whether the SQLSTATEs returned by <code>SQLException.getSQLState</code> + * is X/Open (now known as Open Group) SQL CLI or SQL99. + * @return the type of SQLSTATEs, one of: + * sqlStateXOpen or + * sqlStateSQL99 + * @throws SQLException if a database access error occurs + * @since 1.4 + */ + public int getSQLStateType() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Indicates whether updates made to a LOB are made on a copy or directly + * to the LOB. + * @return <code>true</code> if updates are made to a copy of the LOB; + * <code>false</code> if updates are made directly to the LOB + * @throws SQLException if a database access error occurs + * @since 1.4 + */ + public boolean locatorsUpdateCopy() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves weather this database supports statement pooling. + * + * @return <code>true</code> is so; + <code>false</code> otherwise + * @throws SQLExcpetion if a database access error occurs + * @since 1.4 + */ + public boolean supportsStatementPooling() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java new file mode 100644 index 0000000000..cc1609d646 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java @@ -0,0 +1,181 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; +import java.util.Vector; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/AbstractJdbc3ResultSet.java,v 1.1 2002/08/14 20:35:39 barry Exp $ + * This class defines methods of the jdbc3 specification. This class extends + * org.postgresql.jdbc2.AbstractJdbc2ResultSet which provides the jdbc2 + * methods. The real Statement class (for jdbc3) is org.postgresql.jdbc3.Jdbc3ResultSet + */ +public abstract class AbstractJdbc3ResultSet extends org.postgresql.jdbc2.AbstractJdbc2ResultSet { + + public AbstractJdbc3ResultSet(org.postgresql.PGConnection conn, Statement statement, org.postgresql.Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) { + super (conn, statement, fields, tuples, status, updateCount, insertOID, binaryCursor); + } + + /** + * Retrieves the value of the designated column in the current row + * of this <code>ResultSet</code> object as a <code>java.net.URL</code> + * object in the Java programming language. + * + * @param columnIndex the index of the column 1 is the first, 2 is the second,... + * @return the column value as a <code>java.net.URL</code> object; + * if the value is SQL <code>NULL</code>, + * the value returned is <code>null</code> in the Java programming language + * @exception SQLException if a database access error occurs, + * or if a URL is malformed + * @since 1.4 + */ + public java.net.URL getURL(int columnIndex) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of the designated column in the current row + * of this <code>ResultSet</code> object as a <code>java.net.URL</code> + * object in the Java programming language. + * + * @param columnName the SQL name of the column + * @return the column value as a <code>java.net.URL</code> object; + * if the value is SQL <code>NULL</code>, + * the value returned is <code>null</code> in the Java programming language + * @exception SQLException if a database access error occurs + * or if a URL is malformed + * @since 1.4 + */ + public java.net.URL getURL(String columnName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Ref</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 updateRef(int columnIndex, java.sql.Ref x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Ref</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 updateRef(String columnName, java.sql.Ref x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Blob</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 updateBlob(int columnIndex, java.sql.Blob x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Blob</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 updateBlob(String columnName, java.sql.Blob x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Clob</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 updateClob(int columnIndex, java.sql.Clob x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Updates the designated column with a <code>java.sql.Clob</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 updateClob(String columnName, java.sql.Clob x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + +} + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Statement.java new file mode 100644 index 0000000000..8b18e6153d --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Statement.java @@ -0,0 +1,1300 @@ +package org.postgresql.jdbc3; + + +import java.math.BigDecimal; +import java.sql.*; +import java.util.Calendar; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/AbstractJdbc3Statement.java,v 1.1 2002/08/14 20:35:39 barry Exp $ + * This class defines methods of the jdbc3 specification. This class extends + * org.postgresql.jdbc2.AbstractJdbc2Statement which provides the jdbc2 + * methods. The real Statement class (for jdbc2) is org.postgresql.jdbc3.Jdbc3Statement + */ +public abstract class AbstractJdbc3Statement extends org.postgresql.jdbc2.AbstractJdbc2Statement +{ + + public AbstractJdbc3Statement (AbstractJdbc3Connection c) + { + super(c); + } + + public AbstractJdbc3Statement(AbstractJdbc3Connection connection, String sql) throws SQLException + { + super(connection, sql); + } + + /** + * Moves to this <code>Statement</code> object's next result, deals with + * any current <code>ResultSet</code> object(s) according to the instructions + * specified by the given flag, and returns + * <code>true</code> if the next result is a <code>ResultSet</code> object. + * + * <P>There are no more results when the following is true: + * <PRE> + * <code>(!getMoreResults() && (getUpdateCount() == -1)</code> + * </PRE> + * + * @param current one of the following <code>Statement</code> + * constants indicating what should happen to current + * <code>ResultSet</code> objects obtained using the method + * <code>getResultSet</code: + * <code>CLOSE_CURRENT_RESULT</code>, + * <code>KEEP_CURRENT_RESULT</code>, or + * <code>CLOSE_ALL_RESULTS</code> + * @return <code>true</code> if the next result is a <code>ResultSet</code> + * object; <code>false</code> if it is an update count or there are no + * more results + * @exception SQLException if a database access error occurs + * @since 1.4 + * @see #execute + */ + public boolean getMoreResults(int current) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves any auto-generated keys created as a result of executing this + * <code>Statement</code> object. If this <code>Statement</code> object did + * not generate any keys, an empty <code>ResultSet</code> + * object is returned. + * + * @return a <code>ResultSet</code> object containing the auto-generated key(s) + * generated by the execution of this <code>Statement</code> object + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public ResultSet getGeneratedKeys() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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, + * such as an SQL DDL statement + * @param columnIndexes an array of column indexes indicating 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 or the SQL + * statement returns a <code>ResultSet</code> object + * @since 1.4 + */ + public int executeUpdate(String sql, int columnIndexes[]) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * 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 { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Executes the given SQL statement, which may return multiple results, + * and signals the driver that any + * auto-generated keys should be made available + * for retrieval. The driver will ignore this signal if the SQL statement + * is not an <code>INSERT</code> statement. + * <P> + * In some (uncommon) situations, a single SQL statement may return + * multiple result sets and/or update counts. Normally you can ignore + * this unless you are (1) executing a stored procedure that you know may + * return multiple results or (2) you are dynamically executing an + * unknown SQL string. + * <P> + * The <code>execute</code> method executes an SQL statement and indicates the + * form of the first result. You must then use the methods + * <code>getResultSet</code> or <code>getUpdateCount</code> + * to retrieve the result, and <code>getMoreResults</code> to + * move to any subsequent result(s). + * + * @param sql any SQL statement + * @param autoGeneratedKeys a constant indicating whether auto-generated + * keys should be made available for retrieval using the method + * <code>getGeneratedKeys</code>; one of the following constants: + * <code>Statement.RETURN_GENERATED_KEYS</code> or + * <code>Statement.NO_GENERATED_KEYS</code> + * @return <code>true</code> if the first result is a <code>ResultSet</code> + * object; <code>false</code> if it is an update count or there are + * no results + * @exception SQLException if a database access error occurs + * @see #getResultSet + * @see #getUpdateCount + * @see #getMoreResults + * @see #getGeneratedKeys + * + * @since 1.4 + */ + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Executes the given SQL statement, which may return multiple results, + * and signals the driver that the + * auto-generated keys indicated in the given array should be made available + * for retrieval. This array contains the indexes of the columns in the + * target table that contain the auto-generated keys that should be made + * available. The driver will ignore the array if the given SQL statement + * is not an <code>INSERT</code> statement. + * <P> + * Under some (uncommon) situations, a single SQL statement may return + * multiple result sets and/or update counts. Normally you can ignore + * this unless you are (1) executing a stored procedure that you know may + * return multiple results or (2) you are dynamically executing an + * unknown SQL string. + * <P> + * The <code>execute</code> method executes an SQL statement and indicates the + * form of the first result. You must then use the methods + * <code>getResultSet</code> or <code>getUpdateCount</code> + * to retrieve the result, and <code>getMoreResults</code> to + * move to any subsequent result(s). + * + * @param sql any SQL statement + * @param columnIndexes an array of the indexes of the columns in the + * inserted row that should be made available for retrieval by a + * call to the method <code>getGeneratedKeys</code> + * @return <code>true</code> if the first result is a <code>ResultSet</code> + * object; <code>false</code> if it is an update count or there + * are no results + * @exception SQLException if a database access error occurs + * @see #getResultSet + * @see #getUpdateCount + * @see #getMoreResults + * + * @since 1.4 + */ + public boolean execute(String sql, int columnIndexes[]) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Executes the given SQL statement, which may return multiple results, + * and signals the driver that the + * auto-generated keys indicated in the given array should be made available + * for retrieval. This array contains the names of the columns in the + * target table that contain the auto-generated keys that should be made + * available. The driver will ignore the array if the given SQL statement + * is not an <code>INSERT</code> statement. + * <P> + * In some (uncommon) situations, a single SQL statement may return + * multiple result sets and/or update counts. Normally you can ignore + * this unless you are (1) executing a stored procedure that you know may + * return multiple results or (2) you are dynamically executing an + * unknown SQL string. + * <P> + * The <code>execute</code> method executes an SQL statement and indicates the + * form of the first result. You must then use the methods + * <code>getResultSet</code> or <code>getUpdateCount</code> + * to retrieve the result, and <code>getMoreResults</code> to + * move to any subsequent result(s). + * + * @param sql any SQL statement + * @param columnNames an array of the names of the columns in the inserted + * row that should be made available for retrieval by a call to the + * method <code>getGeneratedKeys</code> + * @return <code>true</code> if the next result is a <code>ResultSet</code> + * object; <code>false</code> if it is an update count or there + * are no more results + * @exception SQLException if a database access error occurs + * @see #getResultSet + * @see #getUpdateCount + * @see #getMoreResults + * @see #getGeneratedKeys + * + * @since 1.4 + */ + public boolean execute(String sql, String columnNames[]) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the result set holdability for <code>ResultSet</code> objects + * generated by this <code>Statement</code> object. + * + * @return either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or + * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> + * @exception SQLException if a database access error occurs + * + * @since 1.4 + */ + public int getResultSetHoldability() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.net.URL</code> value. + * The driver converts this to an SQL <code>DATALINK</code> value + * when it sends it to the database. + * + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the <code>java.net.URL</code> object to be set + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setURL(int parameterIndex, java.net.URL x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the number, types and properties of this + * <code>PreparedStatement</code> object's parameters. + * + * @return a <code>ParameterMetaData</code> object that contains information + * about the number, types and properties of this + * <code>PreparedStatement</code> object's parameters + * @exception SQLException if a database access error occurs + * @see ParameterMetaData + * @since 1.4 + */ + public ParameterMetaData getParameterMetaData() throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Registers the OUT parameter named + * <code>parameterName</code> to the JDBC type + * <code>sqlType</code>. All OUT parameters must be registered + * before a stored procedure is executed. + * <p> + * The JDBC type specified by <code>sqlType</code> for an OUT + * parameter determines the Java type that must be used + * in the <code>get</code> method to read the value of that parameter. + * <p> + * If the JDBC type expected to be returned to this output parameter + * is specific to this particular database, <code>sqlType</code> + * should be <code>java.sql.Types.OTHER</code>. The method + * {@link #getObject} retrieves the value. + * @param parameterName the name of the parameter + * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>. + * If the parameter is of JDBC type <code>NUMERIC</code> + * or <code>DECIMAL</code>, the version of + * <code>registerOutParameter</code> that accepts a scale value + * should be used. + * @exception SQLException if a database access error occurs + * @since 1.4 + * @see Types + */ + public void registerOutParameter(String parameterName, int sqlType) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Registers the parameter named + * <code>parameterName</code> to be of JDBC type + * <code>sqlType</code>. This method must be called + * before a stored procedure is executed. + * <p> + * The JDBC type specified by <code>sqlType</code> for an OUT + * parameter determines the Java type that must be used + * in the <code>get</code> method to read the value of that parameter. + * <p> + * This version of <code>registerOutParameter</code> should be + * used when the parameter is of JDBC type <code>NUMERIC</code> + * or <code>DECIMAL</code>. + * @param parameterName the name of the parameter + * @param sqlType SQL type code defined by <code>java.sql.Types</code>. + * @param scale the desired number of digits to the right of the + * decimal point. It must be greater than or equal to zero. + * @exception SQLException if a database access error occurs + * @since 1.4 + * @see Types + */ + public void registerOutParameter(String parameterName, int sqlType, int scale) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Registers the designated output parameter. This version of + * the method <code>registerOutParameter</code> + * should be used for a user-named or REF output parameter. Examples + * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and + * named array types. + * + * Before executing a stored procedure call, you must explicitly + * call <code>registerOutParameter</code> to register the type from + * <code>java.sql.Types</code> for each + * OUT parameter. For a user-named parameter the fully-qualified SQL + * type name of the parameter should also be given, while a REF + * parameter requires that the fully-qualified type name of the + * referenced type be given. A JDBC driver that does not need the + * type code and type name information may ignore it. To be portable, + * however, applications should always provide these values for + * user-named and REF parameters. + * + * Although it is intended for user-named and REF parameters, + * this method may be used to register a parameter of any JDBC type. + * If the parameter does not have a user-named or REF type, the + * typeName parameter is ignored. + * + * <P><B>Note:</B> When reading the value of an out parameter, you + * must use the <code>getXXX</code> method whose Java type XXX corresponds to the + * parameter's registered SQL type. + * + * @param parameterName the name of the parameter + * @param sqlType a value from {@link java.sql.Types} + * @param typeName the fully-qualified name of an SQL structured type + * @exception SQLException if a database access error occurs + * @see Types + * @since 1.4 + */ + public void registerOutParameter (String parameterName, int sqlType, String typeName) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of the designated JDBC <code>DATALINK</code> parameter as a + * <code>java.net.URL</code> object. + * + * @param parameterIndex the first parameter is 1, the second is 2,... + * @return a <code>java.net.URL</code> object that represents the + * JDBC <code>DATALINK</code> value used as the designated + * parameter + * @exception SQLException if a database access error occurs, + * or if the URL being returned is + * not a valid URL on the Java platform + * @see #setURL + * @since 1.4 + */ + public java.net.URL getURL(int parameterIndex) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.net.URL</code> object. + * The driver converts this to an SQL <code>DATALINK</code> value when + * it sends it to the database. + * + * @param parameterName the name of the parameter + * @param val the parameter value + * @exception SQLException if a database access error occurs, + * or if a URL is malformed + * @see #getURL + * @since 1.4 + */ + public void setURL(String parameterName, java.net.URL val) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to SQL <code>NULL</code>. + * + * <P><B>Note:</B> You must specify the parameter's SQL type. + * + * @param parameterName the name of the parameter + * @param sqlType the SQL type code defined in <code>java.sql.Types</code> + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setNull(String parameterName, int sqlType) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>boolean</code> value. + * The driver converts this + * to an SQL <code>BIT</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getBoolean + * @since 1.4 + */ + public void setBoolean(String parameterName, boolean x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>byte</code> value. + * The driver converts this + * to an SQL <code>TINYINT</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getByte + * @since 1.4 + */ + public void setByte(String parameterName, byte x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>short</code> value. + * The driver converts this + * to an SQL <code>SMALLINT</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getShort + * @since 1.4 + */ + public void setShort(String parameterName, short x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>int</code> value. + * The driver converts this + * to an SQL <code>INTEGER</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getInt + * @since 1.4 + */ + public void setInt(String parameterName, int x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>long</code> value. + * The driver converts this + * to an SQL <code>BIGINT</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getLong + * @since 1.4 + */ + public void setLong(String parameterName, long x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>float</code> value. + * The driver converts this + * to an SQL <code>FLOAT</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getFloat + * @since 1.4 + */ + public void setFloat(String parameterName, float x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>double</code> value. + * The driver converts this + * to an SQL <code>DOUBLE</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getDouble + * @since 1.4 + */ + public void setDouble(String parameterName, double x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given + * <code>java.math.BigDecimal</code> value. + * The driver converts this to an SQL <code>NUMERIC</code> value when + * it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getBigDecimal + * @since 1.4 + */ + public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java <code>String</code> value. + * The driver converts this + * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value + * (depending on the argument's + * size relative to the driver's limits on <code>VARCHAR</code> values) + * when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getString + * @since 1.4 + */ + public void setString(String parameterName, String x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given Java array of bytes. + * The driver converts this to an SQL <code>VARBINARY</code> or + * <code>LONGVARBINARY</code> (depending on the argument's size relative + * to the driver's limits on <code>VARBINARY</code> values) when it sends + * it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getBytes + * @since 1.4 + */ + public void setBytes(String parameterName, byte x[]) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Date</code> value. + * The driver converts this + * to an SQL <code>DATE</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getDate + * @since 1.4 + */ + public void setDate(String parameterName, java.sql.Date x) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Time</code> value. + * The driver converts this + * to an SQL <code>TIME</code> value when it sends it to the database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getTime + * @since 1.4 + */ + public void setTime(String parameterName, java.sql.Time x) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value. + * The driver + * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the + * database. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @exception SQLException if a database access error occurs + * @see #getTimestamp + * @since 1.4 + */ + public void setTimestamp(String parameterName, java.sql.Timestamp x) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given input stream, which will have + * the specified number of bytes. + * When a very large ASCII value is input to a <code>LONGVARCHAR</code> + * parameter, it may be more practical to send it via a + * <code>java.io.InputStream</code>. Data will be read from the stream + * as needed until end-of-file is reached. The JDBC driver will + * do any necessary conversion from ASCII to the database char format. + * + * <P><B>Note:</B> This stream object can either be a standard + * Java stream object or your own subclass that implements the + * standard interface. + * + * @param parameterName the name of the parameter + * @param x the Java input stream that contains the ASCII parameter value + * @param length the number of bytes in the stream + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setAsciiStream(String parameterName, java.io.InputStream x, int length) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given input stream, which will have + * the specified number of bytes. + * When a very large binary value is input to a <code>LONGVARBINARY</code> + * parameter, it may be more practical to send it via a + * <code>java.io.InputStream</code> object. The data will be read from the stream + * as needed until end-of-file is reached. + * + * <P><B>Note:</B> This stream object can either be a standard + * Java stream object or your own subclass that implements the + * standard interface. + * + * @param parameterName the name of the parameter + * @param x the java input stream which contains the binary parameter value + * @param length the number of bytes in the stream + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setBinaryStream(String parameterName, java.io.InputStream x, + int length) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the value of the designated parameter with the given object. The second + * argument must be an object type; for integral values, the + * <code>java.lang</code> equivalent objects should be used. + * + * <p>The given Java object will be converted to the given targetSqlType + * before being sent to the database. + * + * If the object has a custom mapping (is of a class implementing the + * interface <code>SQLData</code>), + * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it + * to the SQL data stream. + * If, on the other hand, the object is of a class implementing + * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>Struct</code>, + * or <code>Array</code>, the driver should pass it to the database as a + * value of the corresponding SQL type. + * <P> + * Note that this method may be used to pass datatabase- + * specific abstract data types. + * + * @param parameterName the name of the parameter + * @param x the object containing the input parameter value + * @param targetSqlType the SQL type (as defined in java.sql.Types) to be + * sent to the database. The scale argument may further qualify this type. + * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, + * this is the number of digits after the decimal point. For all other + * types, this value will be ignored. + * @exception SQLException if a database access error occurs + * @see Types + * @see #getObject + * @since 1.4 + */ + public void setObject(String parameterName, Object x, int targetSqlType, int scale) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the value of the designated parameter with the given object. + * This method is like the method <code>setObject</code> + * above, except that it assumes a scale of zero. + * + * @param parameterName the name of the parameter + * @param x the object containing the input parameter value + * @param targetSqlType the SQL type (as defined in java.sql.Types) to be + * sent to the database + * @exception SQLException if a database access error occurs + * @see #getObject + * @since 1.4 + */ + public void setObject(String parameterName, Object x, int targetSqlType) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the value of the designated parameter with the given object. + * The second parameter must be of type <code>Object</code>; therefore, the + * <code>java.lang</code> equivalent objects should be used for built-in types. + * + * <p>The JDBC specification specifies a standard mapping from + * Java <code>Object</code> types to SQL types. The given argument + * will be converted to the corresponding SQL type before being + * sent to the database. + * + * <p>Note that this method may be used to pass datatabase- + * specific abstract data types, by using a driver-specific Java + * type. + * + * If the object is of a class implementing the interface <code>SQLData</code>, + * the JDBC driver should call the method <code>SQLData.writeSQL</code> + * to write it to the SQL data stream. + * If, on the other hand, the object is of a class implementing + * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>Struct</code>, + * or <code>Array</code>, the driver should pass it to the database as a + * value of the corresponding SQL type. + * <P> + * This method throws an exception if there is an ambiguity, for example, if the + * object is of a class implementing more than one of the interfaces named above. + * + * @param parameterName the name of the parameter + * @param x the object containing the input parameter value + * @exception SQLException if a database access error occurs or if the given + * <code>Object</code> parameter is ambiguous + * @see #getObject + * @since 1.4 + */ + public void setObject(String parameterName, Object x) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + + /** + * Sets the designated parameter to the given <code>Reader</code> + * object, which is the given number of characters long. + * When a very large UNICODE value is input to a <code>LONGVARCHAR</code> + * parameter, it may be more practical to send it via a + * <code>java.io.Reader</code> object. The data will be read from the stream + * as needed until end-of-file is reached. The JDBC driver will + * do any necessary conversion from UNICODE to the database char format. + * + * <P><B>Note:</B> This stream object can either be a standard + * Java stream object or your own subclass that implements the + * standard interface. + * + * @param parameterName the name of the parameter + * @param reader the <code>java.io.Reader</code> object that + * contains the UNICODE data used as the designated parameter + * @param length the number of characters in the stream + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setCharacterStream(String parameterName, + java.io.Reader reader, + int length) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Date</code> value, + * using the given <code>Calendar</code> object. The driver uses + * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value, + * which the driver then sends to the database. With a + * a <code>Calendar</code> object, the driver can calculate the date + * taking into account a custom timezone. If no + * <code>Calendar</code> object is specified, the driver uses the default + * timezone, which is that of the virtual machine running the application. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @param cal the <code>Calendar</code> object the driver will use + * to construct the date + * @exception SQLException if a database access error occurs + * @see #getDate + * @since 1.4 + */ + public void setDate(String parameterName, java.sql.Date x, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Time</code> value, + * using the given <code>Calendar</code> object. The driver uses + * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value, + * which the driver then sends to the database. With a + * a <code>Calendar</code> object, the driver can calculate the time + * taking into account a custom timezone. If no + * <code>Calendar</code> object is specified, the driver uses the default + * timezone, which is that of the virtual machine running the application. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @param cal the <code>Calendar</code> object the driver will use + * to construct the time + * @exception SQLException if a database access error occurs + * @see #getTime + * @since 1.4 + */ + public void setTime(String parameterName, java.sql.Time x, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, + * using the given <code>Calendar</code> object. The driver uses + * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, + * which the driver then sends to the database. With a + * a <code>Calendar</code> object, the driver can calculate the timestamp + * taking into account a custom timezone. If no + * <code>Calendar</code> object is specified, the driver uses the default + * timezone, which is that of the virtual machine running the application. + * + * @param parameterName the name of the parameter + * @param x the parameter value + * @param cal the <code>Calendar</code> object the driver will use + * to construct the timestamp + * @exception SQLException if a database access error occurs + * @see #getTimestamp + * @since 1.4 + */ + public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Sets the designated parameter to SQL <code>NULL</code>. + * This version of the method <code>setNull</code> should + * be used for user-defined types and REF type parameters. Examples + * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and + * named array types. + * + * <P><B>Note:</B> To be portable, applications must give the + * SQL type code and the fully-qualified SQL type name when specifying + * a NULL user-defined or REF parameter. In the case of a user-defined type + * the name is the type name of the parameter itself. For a REF + * parameter, the name is the type name of the referenced type. If + * a JDBC driver does not need the type code or type name information, + * it may ignore it. + * + * Although it is intended for user-defined and Ref parameters, + * this method may be used to set a null parameter of any JDBC type. + * If the parameter does not have a user-defined or REF type, the given + * typeName is ignored. + * + * + * @param paramName the name of the parameter + * @param sqlType a value from <code>java.sql.Types</code> + * @param typeName the fully-qualified name of an SQL user-defined type; + * ignored if the parameter is not a user-defined type or + * SQL <code>REF</code> value + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public void setNull (String parameterName, int sqlType, String typeName) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>, + * or <code>LONGVARCHAR</code> parameter as a <code>String</code> in + * the Java programming language. + * <p> + * For the fixed-length type JDBC <code>CHAR</code>, + * the <code>String</code> object + * returned has exactly the same value the JDBC + * <code>CHAR</code> value had in the + * database, including any padding added by the database. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setString + * @since 1.4 + */ + public String getString(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>BIT</code> parameter as a + * <code>boolean</code> in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>false</code>. + * @exception SQLException if a database access error occurs + * @see #setBoolean + * @since 1.4 + */ + public boolean getBoolean(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>TINYINT</code> parameter as a <code>byte</code> + * in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setByte + * @since 1.4 + */ + public byte getByte(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>SMALLINT</code> parameter as a <code>short</code> + * in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setShort + * @since 1.4 + */ + public short getShort(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>INTEGER</code> parameter as an <code>int</code> + * in the Java programming language. + * + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, + * the result is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setInt + * @since 1.4 + */ + public int getInt(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>BIGINT</code> parameter as a <code>long</code> + * in the Java programming language. + * + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, + * the result is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setLong + * @since 1.4 + */ + public long getLong(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>FLOAT</code> parameter as a <code>float</code> + * in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, + * the result is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setFloat + * @since 1.4 + */ + public float getFloat(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a <code>double</code> + * in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, + * the result is <code>0</code>. + * @exception SQLException if a database access error occurs + * @see #setDouble + * @since 1.4 + */ + public double getDouble(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>BINARY</code> or <code>VARBINARY</code> + * parameter as an array of <code>byte</code> values in the Java + * programming language. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result is + * <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setBytes + * @since 1.4 + */ + public byte[] getBytes(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>DATE</code> parameter as a + * <code>java.sql.Date</code> object. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setDate + * @since 1.4 + */ + public java.sql.Date getDate(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>TIME</code> parameter as a + * <code>java.sql.Time</code> object. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setTime + * @since 1.4 + */ + public java.sql.Time getTime(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a + * <code>java.sql.Timestamp</code> object. + * @param parameterName the name of the parameter + * @return the parameter value. If the value is SQL <code>NULL</code>, the result + * is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setTimestamp + * @since 1.4 + */ + public java.sql.Timestamp getTimestamp(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a parameter as an <code>Object</code> in the Java + * programming language. If the value is an SQL <code>NULL</code>, the + * driver returns a Java <code>null</code>. + * <p> + * This method returns a Java object whose type corresponds to the JDBC + * type that was registered for this parameter using the method + * <code>registerOutParameter</code>. By registering the target JDBC + * type as <code>java.sql.Types.OTHER</code>, this method can be used + * to read database-specific abstract data types. + * @param parameterName the name of the parameter + * @return A <code>java.lang.Object</code> holding the OUT parameter value. + * @exception SQLException if a database access error occurs + * @see Types + * @see #setObject + * @since 1.4 + */ + public Object getObject(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>NUMERIC</code> parameter as a + * <code>java.math.BigDecimal</code> object with as many digits to the + * right of the decimal point as the value contains. + * @param parameterName the name of the parameter + * @return the parameter value in full precision. If the value is + * SQL <code>NULL</code>, the result is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setBigDecimal + * @since 1.4 + */ + public BigDecimal getBigDecimal(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Returns an object representing the value of OUT parameter + * <code>i</code> and uses <code>map</code> for the custom + * mapping of the parameter value. + * <p> + * This method returns a Java object whose type corresponds to the + * JDBC type that was registered for this parameter using the method + * <code>registerOutParameter</code>. By registering the target + * JDBC type as <code>java.sql.Types.OTHER</code>, this method can + * be used to read database-specific abstract data types. + * @param parameterName the name of the parameter + * @param map the mapping from SQL type names to Java classes + * @return a <code>java.lang.Object</code> holding the OUT parameter value + * @exception SQLException if a database access error occurs + * @see #setObject + * @since 1.4 + */ + public Object getObject (String parameterName, java.util.Map map) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>REF(<structured-type>)</code> + * parameter as a {@link Ref} object in the Java programming language. + * + * @param parameterName the name of the parameter + * @return the parameter value as a <code>Ref</code> object in the + * Java programming language. If the value was SQL <code>NULL</code>, + * the value <code>null</code> is returned. + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public Ref getRef (String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>BLOB</code> parameter as a + * {@link Blob} object in the Java programming language. + * + * @param parameterName the name of the parameter + * @return the parameter value as a <code>Blob</code> object in the + * Java programming language. If the value was SQL <code>NULL</code>, + * the value <code>null</code> is returned. + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public Blob getBlob (String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>CLOB</code> parameter as a + * <code>Clob</code> object in the Java programming language. + * @param parameterName the name of the parameter + * @return the parameter value as a <code>Clob</code> object in the + * Java programming language. If the value was SQL <code>NULL</code>, + * the value <code>null</code> is returned. + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public Clob getClob (String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>ARRAY</code> parameter as an + * {@link Array} object in the Java programming language. + * + * @param parameterName the name of the parameter + * @return the parameter value as an <code>Array</code> object in + * Java programming language. If the value was SQL <code>NULL</code>, + * the value <code>null</code> is returned. + * @exception SQLException if a database access error occurs + * @since 1.4 + */ + public Array getArray (String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>DATE</code> parameter as a + * <code>java.sql.Date</code> object, using + * the given <code>Calendar</code> object + * to construct the date. + * With a <code>Calendar</code> object, the driver + * can calculate the date taking into account a custom timezone and locale. + * If no <code>Calendar</code> object is specified, the driver uses the + * default timezone and locale. + * + * @param parameterName the name of the parameter + * @param cal the <code>Calendar</code> object the driver will use + * to construct the date + * @return the parameter value. If the value is SQL <code>NULL</code>, + * the result is <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setDate + * @since 1.4 + */ + public java.sql.Date getDate(String parameterName, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>TIME</code> parameter as a + * <code>java.sql.Time</code> object, using + * the given <code>Calendar</code> object + * to construct the time. + * With a <code>Calendar</code> object, the driver + * can calculate the time taking into account a custom timezone and locale. + * If no <code>Calendar</code> object is specified, the driver uses the + * default timezone and locale. + * + * @param parameterName the name of the parameter + * @param cal the <code>Calendar</code> object the driver will use + * to construct the time + * @return the parameter value; if the value is SQL <code>NULL</code>, the result is + * <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setTime + * @since 1.4 + */ + public java.sql.Time getTime(String parameterName, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a + * <code>java.sql.Timestamp</code> object, using + * the given <code>Calendar</code> object to construct + * the <code>Timestamp</code> object. + * With a <code>Calendar</code> object, the driver + * can calculate the timestamp taking into account a custom timezone and locale. + * If no <code>Calendar</code> object is specified, the driver uses the + * default timezone and locale. + * + * + * @param parameterName the name of the parameter + * @param cal the <code>Calendar</code> object the driver will use + * to construct the timestamp + * @return the parameter value. If the value is SQL <code>NULL</code>, the result is + * <code>null</code>. + * @exception SQLException if a database access error occurs + * @see #setTimestamp + * @since 1.4 + */ + public java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) + throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * Retrieves the value of a JDBC <code>DATALINK</code> parameter as a + * <code>java.net.URL</code> object. + * + * @param parameterName the name of the parameter + * @return the parameter value as a <code>java.net.URL</code> object in the + * Java programming language. If the value was SQL <code>NULL</code>, the + * value <code>null</code> is returned. + * @exception SQLException if a database access error occurs, + * or if there is a problem with the URL + * @see #setURL + * @since 1.4 + */ + public java.net.URL getURL(String parameterName) throws SQLException { + throw org.postgresql.Driver.notImplemented(); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Blob.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Blob.java new file mode 100644 index 0000000000..9d0839898b --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Blob.java @@ -0,0 +1,14 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public class Jdbc3Blob extends org.postgresql.jdbc3.AbstractJdbc3Blob implements java.sql.Blob +{ + + public Jdbc3Blob(org.postgresql.PGConnection conn, int oid) throws SQLException + { + super(conn, oid); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java new file mode 100644 index 0000000000..eef5bd4fbc --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java @@ -0,0 +1,15 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public class Jdbc3CallableStatement extends org.postgresql.jdbc3.AbstractJdbc3Statement implements java.sql.CallableStatement +{ + + public Jdbc3CallableStatement(Jdbc3Connection connection, String sql) throws SQLException + { + super(connection, sql); + } + +} + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Clob.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Clob.java new file mode 100644 index 0000000000..b65ffc7082 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Clob.java @@ -0,0 +1,12 @@ +package org.postgresql.jdbc3; + + +public class Jdbc3Clob extends org.postgresql.jdbc3.AbstractJdbc3Clob implements java.sql.Clob +{ + + public Jdbc3Clob(org.postgresql.PGConnection conn, int oid) throws java.sql.SQLException + { + super(conn, oid); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Connection.java new file mode 100644 index 0000000000..b6f279d7e2 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Connection.java @@ -0,0 +1,61 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; +import java.util.Vector; +import java.util.Hashtable; +import org.postgresql.Field; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/Jdbc3Connection.java,v 1.1 2002/08/14 20:35:40 barry Exp $ + * This class implements the java.sql.Connection interface for JDBC3. + * However most of the implementation is really done in + * org.postgresql.jdbc3.AbstractJdbc3Connection or one of it's parents + */ +public class Jdbc3Connection extends org.postgresql.jdbc3.AbstractJdbc3Connection implements java.sql.Connection +{ + + public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException + { + Jdbc3Statement s = new Jdbc3Statement(this); + s.setResultSetType(resultSetType); + s.setResultSetConcurrency(resultSetConcurrency); + return s; + } + + + public java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException + { + Jdbc3PreparedStatement s = new Jdbc3PreparedStatement(this, sql); + s.setResultSetType(resultSetType); + s.setResultSetConcurrency(resultSetConcurrency); + return s; + } + + public java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException + { + Jdbc3CallableStatement s = new Jdbc3CallableStatement(this,sql); + s.setResultSetType(resultSetType); + s.setResultSetConcurrency(resultSetConcurrency); + return s; + } + + public java.sql.DatabaseMetaData getMetaData() throws SQLException + { + if (metadata == null) + metadata = new Jdbc3DatabaseMetaData(this); + return metadata; + } + + public java.sql.ResultSet getResultSet(Statement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException + { + return new Jdbc3ResultSet(this, statement, fields, tuples, status, updateCount, insertOID, binaryCursor); + } + + public java.sql.ResultSet getResultSet(Statement statement, Field[] fields, Vector tuples, String status, int updateCount) throws SQLException + { + return new Jdbc3ResultSet(this, statement, fields, tuples, status, updateCount, 0, false); + } + +} + + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3DatabaseMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3DatabaseMetaData.java new file mode 100644 index 0000000000..c242c63228 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3DatabaseMetaData.java @@ -0,0 +1,12 @@ +package org.postgresql.jdbc3; + + +public class Jdbc3DatabaseMetaData extends org.postgresql.jdbc3.AbstractJdbc3DatabaseMetaData implements java.sql.DatabaseMetaData +{ + + public Jdbc3DatabaseMetaData(Jdbc3Connection conn) + { + super(conn); + } + +} diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java new file mode 100644 index 0000000000..bc570129eb --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java @@ -0,0 +1,15 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +public class Jdbc3PreparedStatement extends org.postgresql.jdbc3.AbstractJdbc3Statement implements java.sql.PreparedStatement +{ + + public Jdbc3PreparedStatement(Jdbc3Connection connection, String sql) throws SQLException + { + super(connection, sql); + } + +} + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java new file mode 100644 index 0000000000..f2652ee1f5 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java @@ -0,0 +1,35 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; +import java.util.Vector; +import org.postgresql.Field; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/Jdbc3ResultSet.java,v 1.1 2002/08/14 20:35:40 barry Exp $ + * This class implements the java.sql.ResultSet interface for JDBC3. + * However most of the implementation is really done in + * org.postgresql.jdbc3.AbstractJdbc3ResultSet or one of it's parents + */ +public class Jdbc3ResultSet extends org.postgresql.jdbc3.AbstractJdbc3ResultSet implements java.sql.ResultSet +{ + + public Jdbc3ResultSet(Jdbc3Connection conn, Statement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) + { + super(conn, statement, fields, tuples, status, updateCount, insertOID, binaryCursor); + } + + public java.sql.ResultSetMetaData getMetaData() throws SQLException + { + return new Jdbc3ResultSetMetaData(rows, fields); + } + + public java.sql.Clob getClob(int i) throws SQLException { + return new Jdbc3Clob(connection, getInt(i)); + } + + public java.sql.Blob getBlob(int i) throws SQLException { + return new Jdbc3Blob(connection, getInt(i)); + } + +} + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java new file mode 100644 index 0000000000..5dd48a9846 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java @@ -0,0 +1,12 @@ +package org.postgresql.jdbc3; + +public class Jdbc3ResultSetMetaData extends org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData implements java.sql.ResultSetMetaData +{ + + public Jdbc3ResultSetMetaData(java.util.Vector rows, org.postgresql.Field[] fields) + { + super(rows, fields); + } + +} + diff --git a/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java new file mode 100644 index 0000000000..bf6a0d5155 --- /dev/null +++ b/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java @@ -0,0 +1,19 @@ +package org.postgresql.jdbc3; + + +import java.sql.*; + +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/Jdbc3Statement.java,v 1.1 2002/08/14 20:35:40 barry Exp $ + * This class implements the java.sql.Statement interface for JDBC3. + * However most of the implementation is really done in + * org.postgresql.jdbc3.AbstractJdbc3Statement or one of it's parents + */ +public class Jdbc3Statement extends org.postgresql.jdbc3.AbstractJdbc3Statement implements java.sql.Statement +{ + + public Jdbc3Statement (Jdbc3Connection c) + { + super(c); + } + +} |
