db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (DERBY-5505) BLOB and CLOB Reference Manual topics could use some fixes
Date Fri, 18 Nov 2011 16:02:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152935#comment-13152935
] 

Dag H. Wanvik edited comment on DERBY-5505 at 11/18/11 4:00 PM:
----------------------------------------------------------------

Hi Kim! Looks good! Uploading my slightly modified version of the examples.

In the Clob example I changed the test while reading to be "!= -1" instead of "> 0" (0
is not EOF actually, so ">= 0" would be correct, I chose to test on -1 since the Javadoc
says -1 signal EOF).

In the Blob case I changed the reading out of the Blob to use a stream rather then getBytes
(limit memory usage with large data). I also removed the commit statements and the comment
about the autoloading. 

I also changed the fileLength from an int to a long and added comment that the length should
be checked against the 64 L max in the column's datatype.
The final catch with the stack print could be dropped, I guess, just add throws Exception
to main.. The additional closes you suggested are good.

Feel free to use what you think is appropriate for your example! Also, with Java 7 we could
upgrade the examples to the use new try-with-resource to avoid having to close the connection,
but for now we may not want to use that in the examples, most people are still not on Java
7 I guess.

                
      was (Author: dagw):
    Hi Kim! Looks good! Uploading my slightly modified version of the examples.

In the Clob example I change the test while reading to be "!= -1" instead of "> 0" (0 is
not EOF actually, so ">= 0" would be correct, I chose to test on -1 since the Javadoc says
-1 signal EOF).

In the Blob case I change the reading out of the Blob to use a stream rather then getBytes
(limit memory usage with large data). I also removed the commit statements and the comment
about the autoloading. Feel free to use what you think is appropriate for your example!

                  
> BLOB and CLOB Reference Manual topics could use some fixes
> ----------------------------------------------------------
>
>                 Key: DERBY-5505
>                 URL: https://issues.apache.org/jira/browse/DERBY-5505
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.8.2.2
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>            Priority: Minor
>         Attachments: blobex.java, blobex.java, clobex.java, clobex.java
>
>
> The Reference Manual documentation on BLOBs and CLOBs has some gaps that I would like
to fill as a result of my efforts to insert a BLOB into a table column. This should affect
the following topics:
> CAST function (rrefsqlj33562.dita)
> CLOB data type (rrefclob.dita)
> BLOB data type (rrefblob.dita)
> A comment will provide further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message