commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Benedetti (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CSV-234) Add support for java.sql.Clob
Date Sat, 08 Dec 2018 15:29:00 GMT

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

Roberto Benedetti commented on CSV-234:
---------------------------------------

The maximum size for varchar in some databases is 1 or 2 GB ([h2|http://www.h2database.com/html/datatypes.html#varchar_type],
[postgresql|https://www.postgresql.org/docs/9.3/datatype-character.html], [sql server|https://docs.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-2017]),
so we already have such a problem.

[Oracle|https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Data-Types.html#GUID-7B72E154-677A-4342-A1EA-C74C1EA928E6]
limits varchar to 4000 (tipically) or 32767, so we end up using clobs for larger text.

The PR throws an exception if the lenght is greater then Integer.MAX_VALUE, which is the maximum
for H2 varchar.

> Add support for java.sql.Clob
> -----------------------------
>
>                 Key: CSV-234
>                 URL: https://issues.apache.org/jira/browse/CSV-234
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Printer
>    Affects Versions: 1.6
>            Reporter: Roberto Benedetti
>            Priority: Trivial
>
> When invoking CVSPrinter#printRecords(ResultSet) if the object is a java.sql.Clob the
method toString() may not return its content (eg with Oracle drivers it return the basic Object#toString()).
> When dealing with java.sql.Clob a stream must be read.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message