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]