db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r417753 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/impl/jdbc/
Date Wed, 28 Jun 2006 13:35:42 GMT
Author: kahatlen
Date: Wed Jun 28 06:35:42 2006
New Revision: 417753

URL: http://svn.apache.org/viewvc?rev=417753&view=rev
Log:
DERBY-1417: Add new, lengthless overloads to the streaming api

'derby-1417-1a-notImplemented.diff' adds a number of new lengthless
streaming overloads that Derby will not support. All methods added by the
patch throw not-implemented exceptions. We don't support them because we
either don't support the data type or because we don't yet support named
parameters in CallableStatement.

Patch submitted by Kristian Waagan.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java Wed
Jun 28 06:35:42 2006
@@ -191,7 +191,51 @@
     public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
         throw SQLExceptionFactory.notImplemented ("setSQLXML (int, SQLXML)");
     }
-    
+
+    /*********************************************************************************************************
+     * End of methods from PreparedStatement for JDBC 4.0
+     *********************************************************************************************************/
+
+    public void setAsciiStream(String parameterName, InputStream x)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented(
+                "setAsciiStream(String,InputStream)");
+    }
+
+    public void setBinaryStream(String parameterName, InputStream x)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented(
+                "setBinaryStream(String,InputStream)");
+    }
+
+    public void setBlob(String parameterName, InputStream inputStream)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented(
+                "setBlob(String,InputStream)");
+    }
+
+    public void setCharacterStream(String parameterName, Reader reader)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented(
+                "setCharacterStream(String,Reader)");
+    }
+
+    public void setClob(String parameterName, Reader reader)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented("setClob(String,Reader)");
+    }
+
+    public void setNCharacterStream(String parameterName, Reader value)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented(
+                "setNCharacterStream(String,Reader)");
+    }
+
+    public void setNClob(String parameterName, Reader reader)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented("setNClob(String,Reader)");
+    }
+
     /**
      * Returns <code>this</code> if this class implements the interface
      *

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java Wed
Jun 28 06:35:42 2006
@@ -103,13 +103,24 @@
     public void setNString(int index, String value) throws SQLException{
         throw SQLExceptionFactory.notImplemented ("setNString (int, String)");
     }
-    
+
+    public void setNCharacterStream(int parameterIndex, Reader value)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented("setNCharacterStream" +
+                "(int,Reader)");
+    }
+
     public void setNCharacterStream(int index, Reader value, long length) 
                 throws SQLException{
         throw SQLExceptionFactory.notImplemented ("setNCharacterStream " +
                 "(int,Reader,long)");
     }
-    
+
+    public void setNClob(int parameterIndex, Reader reader)
+            throws SQLException {
+        throw SQLExceptionFactory.notImplemented("setNClob(int,Reader)");
+    }
+
     public void setNClob(int index, NClob value) throws SQLException{
         throw SQLExceptionFactory.notImplemented ("setNClob (int, NClob)");
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Wed Jun 28 06:35:42
2006
@@ -3124,6 +3124,16 @@
         }
     }
 
+    public void updateNCharacterStream(int columnIndex, Reader x)
+            throws SQLException {
+        throw jdbc3MethodNotSupported();
+    }
+
+    public void updateNClob(int columnIndex, Reader reader)
+            throws SQLException {
+        throw jdbc3MethodNotSupported();
+    }
+
     // ---------------------- update on column name methods ----------------------
 
     public void updateNull(String columnName) throws SQLException {
@@ -3396,6 +3406,16 @@
         {
             throw se.getSQLException();
         }
+    }
+
+    public void updateNCharacterStream(String columnName, Reader x)
+            throws SQLException {
+        throw jdbc3MethodNotSupported();
+    }
+
+    public void updateNClob(String columnName, Reader reader)
+            throws SQLException {
+        throw jdbc3MethodNotSupported();
     }
 
     // ---------------------------------------------------------------------------

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
Wed Jun 28 06:35:42 2006
@@ -211,13 +211,48 @@
         checkStatus();
         return interfaces.isInstance(this);
     }
-    
+
+    public void setAsciiStream(String parameterName, InputStream x)
+            throws SQLException {
+        throw Util.notImplemented("setAsciiStream(String,InputStream)");
+    }
+
+    public void setBinaryStream(String parameterName, InputStream x)
+            throws SQLException {
+        throw Util.notImplemented("setBinaryStream(String,InputStream)");
+    }
+
+    public void setBlob(String parameterName, InputStream inputStream)
+            throws SQLException {
+        throw Util.notImplemented("setBlob(String,InputStream)");
+    }
+
+    public void setCharacterStream(String parameterName, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented("setCharacterStream(String,Reader)");
+    }
+
+    public void setClob(String parameterName, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented("setClob(String,Reader)");
+    }
+
+    public void setNCharacterStream(String parameterName, Reader value)
+            throws SQLException {
+        throw Util.notImplemented("setNCharacterStream(String,Reader)");
+    }
+
+    public void setNClob(String parameterName, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented("setNClob(String,Reader)");
+    }
+
     /**
      * Returns <code>this</code> if this class implements the interface
      *
      * @param  interfaces a Class defining an interface
      * @return an object that implements the interface
-     * @throws java.sql.SQLExption if no object if found that implements the 
+     * @throws java.sql.SQLException if no object if found that implements the
      * interface
      */
     public <T> T unwrap(java.lang.Class<T> interfaces) 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java
Wed Jun 28 06:35:42 2006
@@ -47,11 +47,21 @@
     public void setNString(int index, String value) throws SQLException{
         throw Util.notImplemented();
     }
-    
+
+    public void setNCharacterStream(int parameterIndex, Reader value)
+            throws SQLException {
+        throw Util.notImplemented();
+    }
+
     public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
         throw Util.notImplemented();
     }
-    
+
+    public void setNClob(int parameterIndex, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented();
+    }
+
     public void setNClob(int index, NClob value) throws SQLException{
         throw Util.notImplemented();
     }    

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java?rev=417753&r1=417752&r2=417753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java Wed Jun
28 06:35:42 2006
@@ -32,7 +32,12 @@
 import org.apache.derby.iapi.reference.SQLState;
 
 /**
- * Implementation of JDBC 4 specific ResultSet methods.
+ * JDBC 4 specific methods that cannot be implemented in superclasses and
+ * unimplemented JDBC 4 methods.
+ * In general, the implementations should be pushed to the superclasses. This
+ * is not possible if the methods use objects or features not available in the
+ * Java version associated with the earlier JDBC version, since Derby classes
+ * are compiled with the lowest possible Java version.
  */
 public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet20{
     
@@ -55,20 +60,22 @@
     public RowId getRowId(String columnName) throws SQLException {
         throw Util.notImplemented();
     }
-    
-    public void updateRowId(int columnIndex, RowId x) throws SQLException {
-        throw Util.notImplemented();
-    }
-    
-    public void updateRowId(String columnName, RowId x) throws SQLException {
+
+    public void updateNCharacterStream(int columnIndex, Reader x)
+            throws SQLException {
         throw Util.notImplemented();
     }
-    
+
     public void updateNCharacterStream(int columnIndex, Reader x, long length)
         throws SQLException {
         throw Util.notImplemented();
     }
-    
+
+    public void updateNCharacterStream(String columnName, Reader x)
+            throws SQLException {
+        throw Util.notImplemented();
+    }
+
     public void updateNCharacterStream(String columnName, Reader x, long length)
         throws SQLException {
         throw Util.notImplemented();
@@ -85,11 +92,21 @@
     public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
         throw Util.notImplemented();
     }
+
+    public void updateNClob(int columnIndex, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented();
+    }
     
     public void updateNClob(String columnName, NClob nClob) throws SQLException {
         throw Util.notImplemented();
     }
-    
+
+    public void updateNClob(String columnName, Reader reader)
+            throws SQLException {
+        throw Util.notImplemented();
+    }
+
     public Reader getNCharacterStream(int columnIndex) throws SQLException {
         throw Util.notImplemented();
     }
@@ -113,7 +130,15 @@
     public String getNString(String columnName) throws SQLException {
         throw Util.notImplemented();
     }
-    
+
+    public void updateRowId(int columnIndex, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+
+    public void updateRowId(String columnName, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+
     public SQLXML getSQLXML(int columnIndex) throws SQLException {
         throw Util.notImplemented();
     }



Mime
View raw message