summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/Statement.java
diff options
context:
space:
mode:
authorPeter Mount <peter@retep.org.uk>2001-01-31 09:23:45 +0000
committerPeter Mount <peter@retep.org.uk>2001-01-31 09:23:45 +0000
commit234599e943dbe0d3c9a31608d208ab496b011638 (patch)
treec0e2b9c27e73d048c90355874951453b36600352 /src/interfaces/jdbc/org/postgresql/Statement.java
parent8439a83d84fb159a790ed2b6d14d4151b9890857 (diff)
Wed Jan 31 08:46:00 GMT 2001 peter@retep.org.uk
- Some minor additions to Statement to make our own extensions more portable. - Statement.close() will now call ResultSet.close() rather than just dissasociating with it.
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/Statement.java')
-rw-r--r--src/interfaces/jdbc/org/postgresql/Statement.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/Statement.java b/src/interfaces/jdbc/org/postgresql/Statement.java
new file mode 100644
index 00000000000..105bc81f2b0
--- /dev/null
+++ b/src/interfaces/jdbc/org/postgresql/Statement.java
@@ -0,0 +1,42 @@
+package org.postgresql;
+
+import java.sql.SQLException;
+
+/**
+ * This class defines methods implemented by the two subclasses
+ * org.postgresql.jdbc1.Statement and org.postgresql.jdbc2.Statement that are
+ * unique to PostgreSQL's JDBC driver.
+ *
+ * <p>They are defined so that client code can cast to org.postgresql.Statement
+ * without having to predetermine the jdbc driver type.
+ *
+ * <p>ie: Before this class existed, you had to use:
+ *
+ * <p>((org.postgresql.jdbc2.Statement)stat).getInsertedOID();
+ *
+ * <p>now you use:
+ *
+ * <p>((org.postgresql.Statement)stat).getInsertedOID();
+ *
+ * <p>As you can see, this is independent of JDBC1.2, JDBC2.0 or the upcoming
+ * JDBC3.
+ */
+
+public abstract class Statement {
+
+ public Statement() {
+ }
+
+ /**
+ * Returns the status message from the current Result.<p>
+ * This is used internally by the driver.
+ *
+ * @return status message from backend
+ */
+ public abstract String getResultStatusString();
+
+ /**
+ * @return the OID of the last row inserted
+ */
+ public abstract int getInsertedOID() throws SQLException;
+} \ No newline at end of file