1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Thu Jan 18 12:24:00 GMT 2001 peter@retep.org.uk

- These methods in org.postgresql.jdbc2.ResultSet are now implemented:
            getBigDecimal(int) ie: without a scale (why did this get missed?)
            getBlob(int)
            getCharacterStream(int)
            getConcurrency()
            getDate(int,Calendar)
            getFetchDirection()
            getFetchSize()
            getTime(int,Calendar)
            getTimestamp(int,Calendar)
            getType()
          NB: Where int represents the column name, the associated version
              taking a String were already implemented by calling the int
              version.
        - These methods no longer throw the not implemented but the new noupdate
          error. This is in preparation for the Updateable ResultSet support
          which will overide these methods by extending the existing class to
          implement that functionality, but needed to show something other than
          notimplemented:
            cancelRowUpdates()
            deleteRow()
        - Added new error message into errors.properties "postgresql.noupdate"
          This is used by jdbc2.ResultSet when an update method is called and
          the ResultSet is not updateable. A new method notUpdateable() has been
          added to that class to throw this exception, keeping the binary size
          down.
        - Added new error message into errors.properties "postgresql.psqlnotimp"
          This is used instead of unimplemented when it's a feature in the
          backend that is preventing this method from being implemented.
        - Removed getKeysetSize() as its not part of the ResultSet API

Thu Jan 18 09:46:00 GMT 2001 peter@retep.org.uk
        - Applied modified patch from Richard Bullington-McGuire
          <rbulling@microstate.com>. I had to modify it as some of the code
          patched now exists in different classes, and some of it actually
          patched obsolete code.

Wed Jan 17 10:19:00 GMT 2001 peter@retep.org.uk
        - Updated Implementation to include both ANT & JBuilder
        - Updated README to reflect the changes since 7.0
	- Created jdbc.jpr file which allows JBuilder to be used to edit the
          source. JBuilder _CAN_NOT_ be used to compile. You must use ANT for
          that. It's only to allow JBuilders syntax checking to improve the
          drivers source. Refer to Implementation for more details
This commit is contained in:
Peter Mount
2001-01-18 14:50:15 +00:00
parent 89ac643964
commit 45b5d792af
25 changed files with 1459 additions and 550 deletions

View File

@ -13,7 +13,7 @@ import org.postgresql.util.PSQLException;
* A Statement object is used for executing a static SQL statement and
* obtaining the results produced by it.
*
* <p>Only one ResultSet per Statement can be open at any point in time.
* <p>Only one ResultSet per Statement can be open at any point in time.
* Therefore, if the reading of one ResultSet is interleaved with the
* reading of another, each must have been generated by different
* Statements. All statement execute methods implicitly close a
@ -29,7 +29,7 @@ public class Statement implements java.sql.Statement
SQLWarning warnings = null; // The warnings chain.
int timeout = 0; // The timeout for a query (not used)
boolean escapeProcessing = true;// escape processing flag
/**
* Constructor for a Statement. It simply sets the connection
* that created us.
@ -81,8 +81,8 @@ public class Statement implements java.sql.Statement
* for this to happen when it is automatically closed. The
* close method provides this immediate release.
*
* <p><B>Note:</B> A Statement is automatically closed when it is
* garbage collected. When a Statement is closed, its current
* <p><B>Note:</B> A Statement is automatically closed when it is
* garbage collected. When a Statement is closed, its current
* ResultSet, if one exists, is also closed.
*
* @exception SQLException if a database access error occurs (why?)
@ -146,7 +146,7 @@ public class Statement implements java.sql.Statement
/**
* If escape scanning is on (the default), the driver will do escape
* substitution before sending the SQL to the database.
* substitution before sending the SQL to the database.
*
* @param enable true to enable; false to disable
* @exception SQLException if a database access error occurs
@ -183,7 +183,7 @@ public class Statement implements java.sql.Statement
/**
* Cancel can be used by one thread to cancel a statement that
* is being executed by another thread. However, PostgreSQL is
* a sync. sort of thing, so this really has no meaning - we
* a sync. sort of thing, so this really has no meaning - we
* define it as a no-op (i.e. you can't cancel, but there is no
* error if you try.)
*
@ -256,7 +256,7 @@ public class Statement implements java.sql.Statement
/**
* Execute a SQL statement that may return multiple results. We
* don't have to worry about this since we do not support multiple
* ResultSets. You can use getResultSet or getUpdateCount to
* ResultSets. You can use getResultSet or getUpdateCount to
* retrieve the result.
*
* @param sql any SQL statement
@ -266,8 +266,10 @@ public class Statement implements java.sql.Statement
*/
public boolean execute(String sql) throws SQLException
{
result = connection.ExecSQL(sql);
return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet());
if(escapeProcessing)
sql=connection.EscapeSQL(sql);
result = connection.ExecSQL(sql);
return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet());
}
/**
@ -309,7 +311,7 @@ public class Statement implements java.sql.Statement
result = ((org.postgresql.ResultSet)result).getNext();
return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet());
}
/**
* Returns the status message from the current Result.<p>
* This is used internally by the driver.