Derby
  1. Derby
  2. DERBY-1255

Implement new JDBC4 methods for creating empty LOBs in the embedded client

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: 10.2.1.6
    • Component/s: JDBC
    • Labels:
      None

      Description

      Implement Connection.createClob() and Connection.createBlob(). Right now these methods are implemented in the network client but not the embedded client.

      1. ClobBlob_create_v1.diff
        10 kB
        V.Narayanan
      2. ClobBlob_create_v1.stat
        0.4 kB
        V.Narayanan

        Activity

        Hide
        Kristian Waagan added a comment -

        create[BC]lob is missing in LogicalConnection on the client side as well. Should be easy to implement there, as the methods already exist in NetConnection.

        As a friendly request, ConnectionTest should be cleaned up regarding testing the create[BC]lob methods. Currently it only tests that these are not implemented on the embedded side.

        Show
        Kristian Waagan added a comment - create [BC] lob is missing in LogicalConnection on the client side as well. Should be easy to implement there, as the methods already exist in NetConnection. As a friendly request, ConnectionTest should be cleaned up regarding testing the create [BC] lob methods. Currently it only tests that these are not implemented on the embedded side.
        Hide
        V.Narayanan added a comment -

        Implementing createClob() and createBlob() Methods on the Embedded Server

        To implement these methods two new constructors have been introduced in
        EmbedClob and EmbedBlob having the following signatures

        EmbedClob(String clobString,EmbedConnection con)
        EmbedBlob(byte [] blobBytes,EmbedConnection con)

        The set methods in the LOB (JDBC3 methods) are not implemented on the Embedded side.
        So the tests basically ensure that the length of the newly created objects in zero
        (i.e.) ensure that they are empty initially.

        ConnectionTest.java was failing because createQueryObject in
        BrokeredConnection40 needed to be forwarded to EmbedConnection40 (i.e.) the
        underlying connection that it wraps. I have fixed that up as part of this patch.

        thanx
        Narayanan

        Show
        V.Narayanan added a comment - Implementing createClob() and createBlob() Methods on the Embedded Server To implement these methods two new constructors have been introduced in EmbedClob and EmbedBlob having the following signatures EmbedClob(String clobString,EmbedConnection con) EmbedBlob(byte [] blobBytes,EmbedConnection con) The set methods in the LOB (JDBC3 methods) are not implemented on the Embedded side. So the tests basically ensure that the length of the newly created objects in zero (i.e.) ensure that they are empty initially. ConnectionTest.java was failing because createQueryObject in BrokeredConnection40 needed to be forwarded to EmbedConnection40 (i.e.) the underlying connection that it wraps. I have fixed that up as part of this patch. thanx Narayanan
        Hide
        Rick Hillegas added a comment -

        Looks like a solid first increment of support needed for this feature. The jdbc4 tests pass. Derbyall passes modulo wisconsin noise. Committed at subversion revision 407549.

        Show
        Rick Hillegas added a comment - Looks like a solid first increment of support needed for this feature. The jdbc4 tests pass. Derbyall passes modulo wisconsin noise. Committed at subversion revision 407549.
        Hide
        V.Narayanan added a comment -

        Thanx for the commit Rick !

        Show
        V.Narayanan added a comment - Thanx for the commit Rick !
        Hide
        Kristian Waagan added a comment -

        The comment by Rick from 18th of May says "Looks like a solid first increment of support needed for this feature.".
        Is there more work to be done for this issue, or is it complete?

        If all the work has been completed, please close this issue.

        Show
        Kristian Waagan added a comment - The comment by Rick from 18th of May says "Looks like a solid first increment of support needed for this feature.". Is there more work to be done for this issue, or is it complete? If all the work has been completed, please close this issue.
        Hide
        Rick Hillegas added a comment -

        I believe Anurag is working on the next piece of this issue.

        Show
        Rick Hillegas added a comment - I believe Anurag is working on the next piece of this issue.
        Hide
        Anurag Shekhar added a comment -

        I am working on set methods for Blob and clob (DERBY-1341). This won't directly effect create methods but with without set methods createBlob and createClob are of not much use.

        Show
        Anurag Shekhar added a comment - I am working on set methods for Blob and clob ( DERBY-1341 ). This won't directly effect create methods but with without set methods createBlob and createClob are of not much use.

          People

          • Assignee:
            Anurag Shekhar
            Reporter:
            Rick Hillegas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development