db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r561514 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
Date Tue, 31 Jul 2007 20:48:40 GMT
Author: mamta
Date: Tue Jul 31 13:48:39 2007
New Revision: 561514

URL: http://svn.apache.org/viewvc?view=rev&rev=561514
Log:
Adding comment to the function that was added for DERBY-2793


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?view=diff&rev=561514&r1=561513&r2=561514
==============================================================================
--- 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 Tue
Jul 31 13:48:39 2007
@@ -1155,6 +1155,25 @@
 		return false;
 	}
 	
+	/**
+	 * Compare the collation info on this DTD with the passed DTD. The rules
+	 * are as follows
+	 * 1)If both the DTDs have collation derivation of NONE, then they can't be
+	 * compared and we return false.
+	 * 2)If both the DTDs have same collation derivation (which in Derby's case
+	 * at this point will mean collation derivation of IMPLICIT), then check
+	 * the collation types. If they match, then return true. If they do not 
+	 * match, then they can't be compared and hence return false.
+	 * 
+	 * In future, when we do support collation derivation of EXPLICIT, we will
+	 * need to change this method so that we follow the correct SQL standard
+	 * rules about what should happen if one collation derivation is EXPLICIT
+	 * and other is NONE/IMPLICIT.
+	 * 
+	 * @param compareWithDTD compare this DTD's collation info
+	 *  
+	 * @return value depends on the algorithm above.
+	 */
 	public boolean compareCollationInfo(DataTypeDescriptor compareWithDTD){
 		//both the operands can not have the collation derivation of
 		//NONE. This is because in that case, we do not know what kind



Mime
View raw message