db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: Collation implementation WAS Re: Should COLLATION attribute related code go in BasicDatabase?
Date Sat, 17 Mar 2007 08:06:15 GMT
Dan, what is CollateSQLChar in the following prototype code?

Dan wrote:
> A method on StringDataValue
>      StringDataValue getValue(RuleBasedCollator collator)
>
>      For SQLChar:
>           getValue(null) would return itself
>            getValue(non-null) would return a new CollateSQLChar() with the
value of the SQLChar and the collator set.
>
>       For CollatorSQLChar
>           getValue(null) would return a new SQLChar() with the value of
the CollateSQLChar
>           getValue(non-null) would return itself with the collator set
correctly.

Mamta

On 3/15/07, Daniel John Debrunner <djd@apache.org> wrote:
>
> 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