db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: Collation implementation WAS Re: Should COLLATION attribute related code go in BasicDatabase?
Date Thu, 15 Mar 2007 18:32:36 GMT
Mamta Satoor wrote:
> In the following snippet of Dan's comments, what does it mean to return 
> SQLChar with the value of CollateSQLChar? I am definitely not clear on 
> the new getValue method on StringDataValue and how it will function for 
> SQLChar and CollatorSQLChar. Dan, can you please elaborate more on it?
>  
> For CollatorSQLChar
>            getValue(null) would return a new SQLChar() with the value of 
> the CollateSQLChar

Example code for CollatorSQLChar

StringDataValue getValue(RuleBasedCollator collation)
{
    if (collation == null)
    {
      // Just need UCS_BASIC collation
      SQLChar s = new SQLChar();
      s.setValue(this);
      return s;
    }

     setCollator(collation);
     return this;
}

I'm assuming that this call is made once when an Activation is 
initialized and not for every compared value.

Dan.


Mime
View raw message