Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2818

Rewrite ClobUpdatableReader constructors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4
    • JDBC
    • None

    Description

      When the fix for DERBY-2806 is in place, the current implementation of ClobUpdateableReader will fail.
      This patch is a preparation for the mentioned issue, and I have also removed some "internal" (package private) methods from EmbedClob and replaced it with a single one.

      Instead of writing methods that forwards calls to the underlying InternalClob, the method getInternalClob will return the internal clob itself. This seems more in place, since the method getByteLength does not belong in EmbedClob. It also comes with a warning that using the reference to the internal clob object requires the caller to take more care. Second, isWritable() does not belong to EmbedClob either, as a Clob is always writable (unless the database/connection itself is read/only). However, the internal clob representation may be read-only, in case EmbedClob must clone the content and create a writable representation.

      The fix leaves more of the handling of implementation details to the InternalClob itself.

      Attachments

        1. derby-2818-1a.diff
          7 kB
          Kristian Waagan
        2. derby-2818-1a.stat
          0.1 kB
          Kristian Waagan

        Issue Links

          Activity

            People

              kristwaa Kristian Waagan
              kristwaa Kristian Waagan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: