db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2800) Implement Clob.truncate for embedded driver
Date Mon, 11 Jun 2007 17:30:25 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Anurag Shekhar updated DERBY-2800:

    Attachment: derby-2800.diff

ClobStreamControl provides most the the method required to implement Clob.truncate. This patch
does implements a few new methods for efficiency.

File Modified


*  makeWritableClobClone (long length) 
   This is a  new overload  of  makeWritableClobClone. This method is to avoid copying entire
StoreStreamClob to ClobStreamControl and then performing truncate on it. This methods calls
out the similar new method 
ClobStreamControl.cloneClobContent to copy specified number of char to the new InternalClob.

* truncate (long len)
  Removed notImplimented Exception. Calling makeWritableClobClone in case of StoreStreamClob
and InternalClob.truncate in case of writable clob.


* copyClobContent(InternalClob clob, long length)
   This is a new method which creates a new Internal copy with only part of the clob. It copies
length chars to the new InternalClob

* cloneClobContent(String dbName,
                                         ConnectionChild conChild,
                                         InternalClob clob,
                                         long length)
This new overload calls out new copyClobContent to make a clone with only part of the clob

*truncate (long)
  This method had a small bug. It was treating the parameter as byte length but the doc says
its char length. Added code to convert it into byte length.


*copyData (InputStream, long)
Modified to take care of stream.read when the read bytes are lesser than number bytes asked

Added a new test suite to test Clob.truncate. Right now its enabled for embedded driver only
as the length chaching on network client causes length check to fail after truncate.

added entry for java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobTruncateTest.java


> Implement Clob.truncate for embedded driver
> -------------------------------------------
>                 Key: DERBY-2800
>                 URL: https://issues.apache.org/jira/browse/DERBY-2800
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions:
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-2800.diff

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message