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 23:14:55 GMT
Mike Matrigali wrote:

> Ok, so effectively language will store collation information on a per
> column basis.  10.3 will interpret 0 representing USC_BASIC, and some
> to be defined method will assign other values for other collations. Will 
> need to make sure there aren't any jdbc calls that blindly return
> scale currently for character types.

I had to rush the last e-mail about scale since I had to pick my son up 
from school, so sorry for that.

I'm not saying that DataTypeDescriptor.getScale() for a character column 
  changes in any way, its api remains the same which would be to return 
zero for any character column.

However for a character datatype we could use the space on-disk that 
scale currently occupies to write collation information, since it's 
always written as zero currently for characters. So the writeExternal() 
would have something like (not actual methods)

    if (i_am_character_type)

and the readExternal

    int v = in.readInt();
    if (i_am_character_type)
       collation = v;
       scale = 0;
       scale = v;

Hope that clears that up.

View raw message