Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-208 Add support to retrieve lobs for Network Server by locator rather than matierializing the LOB
  3. DERBY-2540

Restructure code for Blob/Clob length in client to prepare for locator implementation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.3.1.4
    • Network Client
    • None

    Description

      In order to prepare for the locator-based implementation, I want to restructure the code for getting the length of LOBs.
      Currently, the LOB class has a protected field sqlLength_ that will contain the length of the LOB, if known. Currently, it is always known as long as the LOB has been materialized. However, when locators are introduced, the length may have to be fetched from the server the first time it is needed. With the current implementation, where sqlLength_ is accessed directly by many classes in the package, it will become very difficult to keep track of whether one needs to fetch the length from the server or not.

      I will change the implementation to make Lob.sqlLength_ private and add access methods to get and set its value. (A good thing in itself IMHO). If the length is unknown, the LOB will be materialized to get the length.

      Attachments

        1. derby-2540_2.diff
          25 kB
          Oystein Grovlen
        2. derby-2540.diff
          24 kB
          Oystein Grovlen
        3. derby-2540.stat
          0.4 kB
          Oystein Grovlen

        Activity

          People

            oysteing Oystein Grovlen
            oysteing Oystein Grovlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: