You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by T E Schmitz <ma...@numerixtechnology.de> on 2004/09/19 23:59:19 UTC
case sensitive ORDER BY
Hello,
I am using Torque 3.1 with PostgreSQL 7.4.
I noticed that the generated ORDER BY clause is always case insensitive.
Regardless of Criteria.setIgnoreCase(), for Strings the ORDER BY clause
always uses UPPER(<col>). I had a look at
BasePeer.processOrderBy(), which always calls
db.ignoreCaseInOrderBy(orderByColumn) for Strings.
Is this intended?
How can a case sensitive ORDER Bbe produced?
(processOrderBy() was introduced by Thomas Fischer for the outer join
patch but this particular piece of code is identical to the original in
createQuery())
--
Regards/Gruß,
Tarlika Elisabeth Schmitz
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: case sensitive ORDER BY
Posted by T E Schmitz <ma...@numerixtechnology.de>.
Hello Thomas,
Thanks for your reply.
A few thoughts on case sensitivity:
I think it would be desirable to have the flexibility to decide
separately for ORDER BY and the search itself whether they are to be
case sensitive or not.
I am not quite sure what exactly Criteria.setIgnoreCase() has an effect
on right now (in v3.1). But if you wanted, say, a case sensitive ORDER
BY and case insensitive search criteria, one flag wouldn't do the job.
You would probably need something like an SqlEnum.IEQUAL and
SqlEnum.ILIKE and the corresponding negative operators.
Regards/Gruß,
Tarlika
Thomas Fischer wrote:
> Hi Tarlika,
>
> I did not look at the code, but in Torque 3.1.1-rc2, Henning has completely
> rewritten the handling of order by, so this might be incorporated in the
> latest Release Candidate. If this is the case, you could get the relevant
> code from there and put it into you modified BasePeer.
> I plan to incorporate these changes and the suggestions by Scott in my
> patch, but as I do have little time during the next weeks, this could well
> take till the middle of October.
>
> Thomas
>
> T E Schmitz <ma...@numerixtechnology.de> schrieb am 19.09.2004 23:59:19:
>
>>Is this intended?
>>How can a case sensitive ORDER Bbe produced?
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
RE: case sensitive ORDER BY
Posted by Thomas Fischer <Fi...@seitenbau.net>.
Hi Tarlika,
I did not look at the code, but in Torque 3.1.1-rc2, Henning has completely
rewritten the handling of order by, so this might be incorporated in the
latest Release Candidate. If this is the case, you could get the relevant
code from there and put it into you modified BasePeer.
I plan to incorporate these changes and the suggestions by Scott in my
patch, but as I do have little time during the next weeks, this could well
take till the middle of October.
Thomas
T E Schmitz <ma...@numerixtechnology.de> schrieb am 19.09.2004 23:59:19:
> Hello,
>
> I am using Torque 3.1 with PostgreSQL 7.4.
>
> I noticed that the generated ORDER BY clause is always case insensitive.
> Regardless of Criteria.setIgnoreCase(), for Strings the ORDER BY clause
> always uses UPPER(<col>). I had a look at
> BasePeer.processOrderBy(), which always calls
> db.ignoreCaseInOrderBy(orderByColumn) for Strings.
>
> Is this intended?
> How can a case sensitive ORDER Bbe produced?
>
> (processOrderBy() was introduced by Thomas Fischer for the outer join
> patch but this particular piece of code is identical to the original in
> createQuery())
>
> --
>
>
> Regards/Gruß,
>
> Tarlika Elisabeth Schmitz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org