If you support a data type such as Blob/Clob, you must implement all methods on the interface, not pick and choose.

If your backend does not support the data type, then all methods should throw SQLFeatureNotSupportedException.

This was a problem in the earlier JDBC specs as it did not clarify which methods were required and which were not.

Dyre Tjeldvoll (JIRA) wrote:
     [ http://issues.apache.org/jira/browse/DERBY-1253?page=all ]

Dyre Tjeldvoll updated DERBY-1253:
----------------------------------

    Attachment: derby-1253.v1.diff
                derby-1253.v1.stat

Attaching a patch that updates the exclude map with additional interfaces and methods.
It still fails, but complains about fewer unsupported methods. I have run the test in embedded and DerbyNetClient, but I have not run any other tests.

The indentation mode that I use doesn't seem to grok such complicated array initializations, so the indentation is a bit strange in some places. And I have not even tried to avoid lines longer than 80 chars here, since that would make the exclude map initialization unreadable...

I'm a bit unsure about what to accept for Blob/Clob. All the methods in these interfaces are allowed to throw NotImplemented, but I'm wondering if the spec allows only some of them to be not implemented?


  
Verify that we don't raise SQLFeatureNotSupportedException for mandatory methods
--------------------------------------------------------------------------------

         Key: DERBY-1253
         URL: http://issues.apache.org/jira/browse/DERBY-1253
     Project: Derby
        Type: Improvement
    

  
  Components: JDBC
    Versions: 10.2.0.0
    Reporter: Rick Hillegas
    Assignee: Dyre Tjeldvoll
     Fix For: 10.2.0.0
 Attachments: bug1253_verifier.diff, bug1253_verifier2.diff, derby-1253.v1.diff, derby-1253.v1.stat

The jdk16 javadoc marks optional methods as being able to raise SQLFeatureNotSupportedException. Make sure that we don't raise this exception for mandatory methods--unless we clearly understand why we have chosen to deviate from the JDBC spec.
    

  

Reply via email to