You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Daniel Rall <dl...@finemaltcoding.com> on 2002/03/18 20:36:51 UTC
Re: cvs commit: jakarta-turbine-torque/src/java/org/apache/torque /util BasePeer.java
Fedor Karpelevitch <fe...@Barra.COM> writes:
>> -----Original Message-----
>> From: dlr@apache.org [mailto:dlr@apache.org]
>> Sent: Sunday, March 17, 2002 11:59 PM
>> To: jakarta-turbine-torque-cvs@apache.org
>> Subject: cvs commit:
>> jakarta-turbine-torque/src/java/org/apache/torque/util BasePeer.java
>>
>>
>> dlr 02/03/17 23:59:03
>>
>> Modified: src/java/org/apache/torque/adapter DB.java
>> DBOracle.java
>> src/java/org/apache/torque/util BasePeer.java
>> Log:
>> Merged in patch by Bill Schneider <bs...@vecna.com> to improve
>> support for Oracle:
>>
>> "Here goes -- this patch should take care of native limits
>> on Oracle +
>> date formatting in Oracle adapter. Why not kill two birds with one
>> stone?"
>>
>> Bill's patch included handling of native limits for Sybase, which I
>> commented out because it was not mentioned in his
>> description, I have
>> no Sybase installation to test against, and the MS SQL adapter
>> subclasses from the Sybase adapter (making the change seem more
>> risky). I also cleaned up the date handling portion of the patch to
>> call a private method which I added to reduce code duplication.
>>
>
> <snip>
>
>> + /**
>> + * This method is used to format any date string using Oracle's
>> + * <code>TO_DATE</code> built-in function.
>> + */
>> + private final String formatDate(String date)
>> + {
>> + char delim = getStringDelimiter();
>> + return ("TO_DATE(" + delim + date + delim + ", " + delim +
>> + "yyyy-mm-dd hh24:mi:ss" + delim + ')');
>> + }
>> }
>>
>
> are you guys sure standard JDBC escapes do not work for Oracle? If they do
> why not use them?
I don't have an Oracle install to test on, only repeated reports that
date handling was broken for Oracle (mostly from Scarab users), and
this patch from Bill. IMO it seems like a reasonable change even if
it is only absolutely necessary in older Oracle installs.
- Dan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>