diff options
author | Dave Cramer <davec@fastcrypt.com> | 2002-06-13 14:02:50 +0000 |
---|---|---|
committer | Dave Cramer <davec@fastcrypt.com> | 2002-06-13 14:02:50 +0000 |
commit | 603c46d8cebb07ed128decb7e5236d94af7630ff (patch) | |
tree | eb219706d692dedb154db68f987b960616a69188 /src | |
parent | 7873bed77c51bdc81442f31e479b879eb7cb7ede (diff) | |
download | postgresql-603c46d8cebb07ed128decb7e5236d94af7630ff.tar.gz postgresql-603c46d8cebb07ed128decb7e5236d94af7630ff.zip |
changes to accomodate updateable resultset mostly just call setSqlQuery on execute
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java | 113 |
1 files changed, 112 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java b/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java index 2bbced64fd5..a00025ff72a 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java @@ -71,6 +71,8 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat public int executeUpdate(String sql) throws SQLException { this.execute(sql); + if (((org.postgresql.ResultSet)result).reallyResultSet()) + throw new PSQLException("postgresql.stat.result"); return this.getUpdateCount(); } @@ -124,12 +126,17 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat rs.close(); } + // New in 7.1, pass Statement so that ExecSQL can customise to it result = connection.ExecSQL(sql, this); // New in 7.1, required for ResultSet.getStatement() to work ((org.postgresql.jdbc2.ResultSet)result).setStatement(this); + // Added this so that the Updateable resultset knows the query that gave this + ((org.postgresql.jdbc2.ResultSet)result).setSQLQuery(sql); + + return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet()); } @@ -267,4 +274,108 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat { resultsettype = value; } -} + + // In JDK 1.4 not implemented + /** + * + * @param num + * @return + * @throws SQLException + */ + public boolean getMoreResults(int num) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * + * @return + * @throws SQLException + */ + public java.sql.ResultSet getGeneratedKeys() throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * + * @param a + * @param b + * @return + * @throws SQLException + */ + public int executeUpdate(String a, int b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + } + + /** + * + * @param a + * @param b + * @return + * @throws SQLException + */ + public int executeUpdate(String a, int[] b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + + public int executeUpdate(String a, String[] b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + + /** + * + * @param a + * @param b + * @return + * @throws SQLException + */ + public boolean execute(String a, int b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + + /** + * + * @param a + * @param b + * @return + * @throws SQLException + */ + public boolean execute(String a, int[] b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + + /** + * + * @param a + * @param b + * @return + * @throws SQLException + */ + public boolean execute(String a, String[] b) throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + + /** + * + * @return + * @throws SQLException + */ + public int getResultSetHoldability() throws SQLException + { + throw org.postgresql.Driver.notImplemented(); + + } + +}
\ No newline at end of file |