Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 74411 invoked from network); 23 Nov 2003 16:49:59 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Nov 2003 16:49:59 -0000 Received: (qmail 77694 invoked by uid 500); 23 Nov 2003 16:49:53 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 77507 invoked by uid 500); 23 Nov 2003 16:49:52 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 77494 invoked from network); 23 Nov 2003 16:49:51 -0000 Received: from unknown (HELO webmail3.jaring.my) (61.6.32.243) by daedalus.apache.org with SMTP; 23 Nov 2003 16:49:51 -0000 Received: from webmail3.jaring.my (localhost.jaring.my [127.0.0.1]) by webmail3.jaring.my (8.12.9p2/8.12.9) with ESMTP id hANGnqDC039018; Mon, 24 Nov 2003 00:49:52 +0800 (MYT) (envelope-from ywchiu@paradigm.com.my) Received: (from www@localhost) by webmail3.jaring.my (8.12.9p2/8.12.9/Submit) id hANGnphR039017; Mon, 24 Nov 2003 00:49:51 +0800 (MYT) (envelope-from ywchiu@paradigm.com.my) X-Authentication-Warning: webmail3.jaring.my: www set sender to ywchiu@paradigm.com.my using -f Received: from j26.chk.jaring.my (j26.chk.jaring.my [161.142.39.92]) by webmail.jaring.my (IMP) with HTTP for ; Mon, 24 Nov 2003 00:49:51 +0800 Message-ID: <1069606191.3fc0e52f3834a@webmail.jaring.my> Date: Mon, 24 Nov 2003 00:49:51 +0800 From: CHIU YEE WEAY To: Daniel Rall Cc: Apache Torque Developers List Subject: Re: Unicode support for varchar References: <001b01c3ae57$d0642e40$c900007e@PSSBDEV1> <3FBD77C5.6090906@finemaltcoding.com> <1069431389.3fbe3a5d2e4c7@webmail.jaring.my> <3FBEB8E5.7020401@finemaltcoding.com> In-Reply-To: <3FBEB8E5.7020401@finemaltcoding.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: JARING Webmail v1.2 (http://www.jaring.my) X-Originating-IP: 161.142.39.92 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Greetings Dan, Yes, will try to write for the patch. Give me some time. Thanks. Chiu Yee Weay Systems Engineer Paradigm Systems Sdn Bhd Quoting Daniel Rall : > I see. I suggest changing Torque to add support for this patch which > adds an > encoding attribute to the element: > > Index: database.dtd > =================================================================== > RCS file: /home/cvs/db-torque/src/generator/src/dtd/database.dtd,v > retrieving revision 1.3 > diff -u -r1.3 database.dtd > --- database.dtd 3 Nov 2003 06:37:27 -0000 1.3 > +++ database.dtd 22 Nov 2003 01:14:52 -0000 > @@ -114,6 +114,7 @@ > scale CDATA #IMPLIED > default CDATA #IMPLIED > autoIncrement (true|false) "false" > + encoding CDATA #IMPLIED > inheritance (single|false) "false" > inputValidator CDATA #IMPLIED > javaNamingMethod (nochange|underscore|javaname) #IMPLIED > > If not specified, encoding would have no effect. If "UTF-8", data > types like > NVARCHAR would be used for platforms like MS SQL. Interested in trying > your > hand at a patch to the generator? Martin's recent introduction of the > Platform > classes ought to make this pretty easy. > > - Dan > > > CHIU YEE WEAY wrote: > > Greetings Dan, > > > > There are times where we only want to have certain varchar columns in > a > > table to support unicode, but not all, due to the size. Thus, the > missing > > of a property to indicate the unicode support for a column in the > XML > > schema, will not allow me to know whether tha native data type to use > is > > varchar or nvarchar (in mssql case). The default will always be > varchar. > > > > A simpler example for illustrating my problem will be : Let say, I > have a > > nvarchar column in a table in mssql. When I generate the XML schema > for > > this table, the column will always be in VARCHAR. When I use the > > generated XML schema to come out for the database creation scripts > in > > mssql, it will always give me as varchar, instead of the expected > > nvarchar, as no attributes in the schema to indicate this is, in > fact, a > > nvarchar column. > > > > Or is there any workaround that you can think of ? > > > > Chiu Yee Weay > > Systems Engineer > > Paradigm Systems Sdn Bhd > > > > Quoting Daniel Rall : > > > > > >>Chiu Yee Weay wrote: > >> > >>>Greetings, > >>> > >>>I would like to know how can we indicate a varchar column to > support > >>>Unicode characters in the schema ? This would be something like the > >>>nvarchar column in MS SQL Server. Anyway, the standard JDBC type > >> > >>doesn't > >> > >>>have any special data type to differentiate between the non-Unicode > >> > >>or > >> > >>>Unicode varchar column. Perhaps we need an additional attribute for > >> > >>the > >> > >>> element in the schema to indicate this, e.g. > >>>unicode="true|false". > >> > >>Hi Chiu. Any particular reason why you suggest per-column, rather > than > >> > >>per-table or per-database? The property could be ignored for > columns > >>where it > >>isn't applicable. > > > [ Scanned by JARING E-Mail Virus Scanner ( http://www.jaring.my ) ] > ---------------------------------------------------------------- This e-mail has been sent via JARING webmail at http://www.jaring.my --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org