Martin Kalén | 1 Apr 2005 08:48
Picon
Favicon

Re: I18n and Oracle9

Vadim Gritsenko wrote:
> As you might know, in default Oracle install,
> 
>     VALUE VARCHAR(20)
> 
> actually means 20 *bytes*, not 20 characters. So for i18n applications 
> this means that actual limit is closer to 10 or less characters - 
> depending on encoding. Since Oracle9 it's possible to specify that when 
> you create a character field of specified length you actually *do* mean 
> that this length is in characters, not bytes! New syntax is:
> 
>     VALUE VARCHAR(20 CHAR)
> 
> Alternatively, one can use NVARCHAR, which is (AFAIU) will always use 
> UTF-16 encoding and length is always in characters, not bytes.
> 
> Questions,
> 
>   * Is there a way to instruct torque to create schema using above syntax?

To my knowledge, Torque does not have switchable syntax like this. You should
really ask Thomas Fisher and the others over at torque-dev or torque-user,
since I'm not a Torque expert.

>   * Is there a way to instruct torque to use nvarchar instead of varchar?

As we've seen in OJB 1.0.2, it's possible to patch Torque templates to
accomplish this. But that's a really ugly solution IMO and just a temporary
work-around for the outdated Torque in 1.0.x branch.

(Continue reading)

Thomas Dudziak | 1 Apr 2005 09:28
Picon
Gravatar

Re: I18n and Oracle9

> Directly to Tom: Is it possible to switch the generated default datatype in
> DdlUtils? Eg could Vadim's wish of NVARCHAR instead of CHAR be accomplished
> through property-changes or similar?

Not right now, but this can be easily accomplished, though we might
opt for a generic solution for databases that support this (e.g. a
charset = ASCII | UNICODE attribute or something similar).
You can add this yourself, you'll be on the initial committers list
for DdlUtils ;-)

Tom
Martin Kalén | 1 Apr 2005 12:59
Picon
Favicon

Re: I18n and Oracle9

Thomas Dudziak wrote:
>>Directly to Tom: Is it possible to switch the generated default datatype in
>>DdlUtils? Eg could Vadim's wish of NVARCHAR instead of CHAR be accomplished
>>through property-changes or similar?
> 
> Not right now, but this can be easily accomplished, though we might
> opt for a generic solution for databases that support this (e.g. a
> charset = ASCII | UNICODE attribute or something similar).

OK. I think we can summarize with: "no, not in OJB 1.0.x" and
"it would be possible, but is not implemented in OJB 1.1 + DdlUtils".

Any thoughts on a generic approach for DdlUtils, Vadim?

> You can add this yourself, you'll be on the initial committers list
> for DdlUtils ;-)

Good, that makes it one iteration less. :)

I assume you will announce completed project migration here on ojb-dev too?

Cheers,
  Martin
Vadim Gritsenko | 1 Apr 2005 17:30

Re: I18n and Oracle9

Martin Kalén wrote:
> 
> Any thoughts on a generic approach for DdlUtils, Vadim?

Can you point me to the place where ddlutils code lives now?

Vadim
Martin Kalén | 4 Apr 2005 11:15
Picon
Favicon

Re: I18n and Oracle9

Vadim Gritsenko wrote:
>> Any thoughts on a generic approach for DdlUtils, Vadim?
> 
> Can you point me to the place where ddlutils code lives now?

It is currently in the Jakarta Commons Sandbox CVS as "Commons SQL" [1],
but under migration to db.apache.org and SVN.

According to Tom the migration should be completed shortly
(he will announce it here on ojb-dev when done).

Regards,
  Martin

[1] http://jakarta.apache.org/commons/sandbox/sql/
Thomas Dudziak | 1 Apr 2005 13:02
Picon
Gravatar

Re: I18n and Oracle9

On Apr 1, 2005 12:59 PM, Martin Kalén <mkalen <at> apache.org> wrote:
> Thomas Dudziak wrote:
> >>Directly to Tom: Is it possible to switch the generated default datatype in
> >>DdlUtils? Eg could Vadim's wish of NVARCHAR instead of CHAR be accomplished
> >>through property-changes or similar?
> >
> > Not right now, but this can be easily accomplished, though we might
> > opt for a generic solution for databases that support this (e.g. a
> > charset = ASCII | UNICODE attribute or something similar).
> 
> OK. I think we can summarize with: "no, not in OJB 1.0.x" and
> "it would be possible, but is not implemented in OJB 1.1 + DdlUtils".

No I think the latter is easily doable as the change is minimal in DdlUtils.

> Any thoughts on a generic approach for DdlUtils, Vadim?
> 
> > You can add this yourself, you'll be on the initial committers list
> > for DdlUtils ;-)
> 
> Good, that makes it one iteration less. :)

Indeed ;-)

> I assume you will announce completed project migration here on ojb-dev too?

Yep, actually the website is already up, and the SVN migration and the
mailing lists are in the works.

Tom
(Continue reading)


Gmane