Yes, this is the only place using the toUpperCase(String) method. I first
thought of calling it ignoreCase(String), but since the only way I was
implementing it was using the UPPER() method, I thought I might as well be
clear about what is being done.
As far as I am concerned, you can go either way.
1. return null for the toUpperCase() method in InterBaseDB, since it does
not implement it in the one way that Turbine currently uses it.
2. create a new method (ignoreCase() or any good name that you like) and
use it the one place in BasePeer for ordering. Make sure you add this
method to the other DB classes.
>We might also need to
> put into column map support to automatically upodate the doppleganger
> column.
Interested to see your implementation of this.
----- Original Message -----
From: David Warnock <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Tuesday, March 07, 2000 4:22 AM
Subject: DB - Upper problem with Interbase
> Hi,
>
> We are working on supporting Interbase for Turbine and have a problem.
> In the DB interface there is the method
>
> public String toUpperCase(String in);
>
> So far as we can see this method is only called in BasePeer in the
> createQueryString method (line 730).
>
> The problem is that Interbase supports UPPER(column) in several places
> but not in the ORDER BY clause so
>
> select UPPER(x) from y
>
> is fine in Interbase BUT
>
> select x from y order by UPPER(x)
>
> is not.
>
> We have seen that in some other implementations of DB the toUpperCase
> method does nothing, we can of course do this but are worried that this
> is not the "right" thing to do.
>
> My questions
>
> 1. Is this toUpperCase method only to be used for uppercasing in order
> by?
>
> If it is then the name is unclear. If it is not then we really need
> separate methods so that we can support uppercase where we can.
>
> 2. In Interbase we generally have a doppleganger column that is held as
> the uppercase version of any column we want case insensitive sorting on
> (this is particularly helpful when using Unicode as the uppercasing of
> some characters varies by locale so we tend to let java do this rather
> than the database).
>
> I wonder whether something could be done in the Column map to hold the
> string to be used to get case insensitive column values for selection
> and sorting. This would allow us to use "UPPER(x)" for output columns
> and "ORDER BY doppleganger" for order by clauses. We might also need to
> put into column map support to automatically upodate the doppleganger
> column.
>
>
> I don't want to rush in and provide any patches for this until I
> understand a bit more about what we should be doing.
>
> Thanks
>
> Dave
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]