db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r534157 - in /db/derby/code/trunk/java/engine/org/apache/derby: catalog/types/TypeDescriptorImpl.java iapi/types/StringDataValue.java
Date Tue, 01 May 2007 17:00:15 GMT
Author: mamta
Date: Tue May  1 10:00:14 2007
New Revision: 534157

URL: http://svn.apache.org/viewvc?view=rev&rev=534157
Log:
DERBY-2599 : This patch will have the collation type default to UCS_BASIC. It can be set to
TERRITORY_BASED wherever applicable using DataTypeDescriptor.setCollationType.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/StringDataValue.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java?view=diff&rev=534157&r1=534156&r2=534157
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java
Tue May  1 10:00:14 2007
@@ -55,9 +55,9 @@
 	private boolean					isNullable;
 	private int						maximumWidth;
 	/** @see TypeDescriptor#getCollationType() */
-	private int						collationType;
+	private int	collationType = StringDataValue.COLLATION_TYPE_UCS_BASIC;
 	/** @see TypeDescriptor#getCollationDerivation() */
-	private int					collationDerivation = StringDataValue.COLLATION_DERIVATION_IMPLICIT;
+	private int	collationDerivation = StringDataValue.COLLATION_DERIVATION_IMPLICIT;
 
 	/**
 	 * Public niladic constructor. Needed for Formatable interface to work.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/StringDataValue.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/StringDataValue.java?view=diff&rev=534157&r1=534156&r2=534157
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/StringDataValue.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/StringDataValue.java Tue May
 1 10:00:14 2007
@@ -35,7 +35,7 @@
 	/**
 	  For a character string type, the collation derivation should always be 
 	  "explicit"(not possible in Derby 10.3), "implicit" or "none". We will 
-	  start by setting it to "none" in TypeDescriptorImpl. At runtime, only 
+	  start by setting it to "implicit" in TypeDescriptorImpl. At runtime, only 
 	  character string types which are results of aggregate methods dealing 
 	  with operands with different collation types should have a collation 
 	  derivation of "none". All the other character string types should have 
@@ -54,6 +54,12 @@
 	 * 2)all the character string columns belonging to system tables will have 
 	 * collation type of UCS_BASIC but all the character string columns 
 	 * belonging to user tables will have collation type of TERRITORY_BASED.
+	 * 
+	 * Data types will start with collation type defaulting to UCS_BASIC in
+	 * TypeDescriptorImpl. This collation type ofcourse makes sense fpr 
+	 * character string types only. It will be ignored for the rest of the
+	 * types. If a character's collation type should be TERRIOTRY_BASED, then
+	 * DTD.setCollationType can be called to change the default of UCS_BASIC.
 	 */
 	public	static final int COLLATION_TYPE_UCS_BASIC = 0;
 	/** @see StringDataValue#COLLATION_TYPE_UCS_BASIC */



Mime
View raw message