Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 18593 invoked from network); 20 Jul 2006 08:42:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2006 08:42:30 -0000 Received: (qmail 56777 invoked by uid 500); 20 Jul 2006 08:42:30 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 56751 invoked by uid 500); 20 Jul 2006 08:42:30 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 56740 invoked by uid 99); 20 Jul 2006 08:42:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 01:42:29 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 01:42:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 1DEE61A981A; Thu, 20 Jul 2006 01:42:09 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r423827 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Date: Thu, 20 Jul 2006 08:42:08 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060720084209.1DEE61A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: kahatlen Date: Thu Jul 20 01:42:06 2006 New Revision: 423827 URL: http://svn.apache.org/viewvc?rev=423827&view=rev Log: DERBY-1443: DataTypeDescriptor.isBinaryType() return false for Types.BLOB Adding javadoc for isBinaryType() and isCharacterType() clarifying why they return false for BLOB and CLOB. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java?rev=423827&r1=423826&r2=423827&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Thu Jul 20 01:42:06 2006 @@ -1017,6 +1017,23 @@ } } + /** + * Check whether a JDBC type is one of the character types that are + * compatible with the Java type String. + * + *

Note: CLOB is not compatible with + * String. See tables B-4, B-5 and B-6 in the JDBC 3.0 + * Specification. + * + *

There are some non-character types that are compatible with + * String (examples: numeric types, binary types and + * time-related types), but they are not covered by this method. + * + * @param jdbcType a JDBC type + * @return true iff jdbcType is a character type + * and compatible with String + * @see java.sql.Types + */ private static boolean isCharacterType(int jdbcType) { switch (jdbcType) { @@ -1029,6 +1046,19 @@ } } + /** + * Check whether a JDBC type is compatible with the Java type + * byte[]. + * + *

Note: BLOB is not compatible with + * byte[]. See tables B-4, B-5 and B-6 in the JDBC 3.0 + * Specification. + * + * @param jdbcType a JDBC type + * @return true iff jdbcType is compatible with + * byte[] + * @see java.sql.Types + */ private static boolean isBinaryType(int jdbcType) { switch (jdbcType) { case Types.BINARY: