Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 54347 invoked from network); 25 Jul 2005 08:18:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jul 2005 08:18:00 -0000 Received: (qmail 91710 invoked by uid 500); 25 Jul 2005 08:17:57 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 91536 invoked by uid 500); 25 Jul 2005 08:17:51 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 90947 invoked by uid 99); 25 Jul 2005 08:17:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 01:17:47 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=INFO_TLD,SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.77.152.181] (HELO mail.hometree.net) (194.77.152.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 01:17:40 -0700 Received: from tangens.hometree.net (mail.hometree.net [194.77.152.181]) by mail.hometree.net (8.12.11/8.12.11) with ESMTP id j6P8HhKL005704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Jul 2005 10:17:43 +0200 Received: (from news@localhost) by tangens.hometree.net (8.12.11/8.12.11/Submit) id j6P8HhNt005702 for torque-dev@db.apache.org; Mon, 25 Jul 2005 10:17:43 +0200 To: torque-dev@db.apache.org Path: not-for-mail From: "Henning P. Schmiedehausen" Newsgroups: hometree.jakarta.torque.dev Subject: Re: initial values Date: Mon, 25 Jul 2005 08:17:43 +0000 (UTC) Organization: INTERMETA - Gesellschaft fuer Mehrwertdienste mbH Lines: 131 Message-ID: References: <000a01c587bf$03ac6460$0600000a@mickey> Reply-To: hps@intermeta.de NNTP-Posting-Host: forge.intermeta.de X-Trace: tangens.hometree.net 1122279463 5096 194.77.152.164 (25 Jul 2005 08:17:43 GMT) X-Complaints-To: news@intermeta.de NNTP-Posting-Date: Mon, 25 Jul 2005 08:17:43 +0000 (UTC) X-Copyright: (C) 1996-2005 Henning Schmiedehausen User-Agent: nn/6.6.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N "Mickey Mokotov" writes: actually it does. However, it involves XML. :-) After you built your schema, you run the "torque:datadtd" task. This will create a simple DTD for your schema. According to this DTD; you can then create an XML file which contains your data. This can be loaded into the database by running the torque:datasql task. An example: On Turbine, we have turbine-security-schema which contains the following table: --- cut ---
--- cut --- running torque:datadtd creates turbine-security-data.dtd [...] --- cut --- According to this DTD, you can now create turbine-security-data.xml --- cut --- [...] [...] --- cut --- this turbine-security-data.xml file will create a data SQL file when you run the torque:datasql and it will be inserted on torque:insert-sql. I do use this with great success in a number of projects (I do load a country table with defaults BTW. ;-) ) Regards Henning >------=_NextPart_000_000B_01C587CF.C7353460 >Content-Type: text/plain; > charset="us-ascii" >Content-Transfer-Encoding: quoted-printable >Hi guys, >=20 >Q: I want to fill tables with initial values (for example, one might = >want to >have a Country table, and than have this table filled with all the >countries). >Does torque schema support adding values for tables?=20 >I'm asking since I'd rather avoid having a 'db-creation-script', rather = >I'd >like to keep the schema.xml on cvs and generate the db-creation-script >whenever I need. >=20 >--=20 > www.FetchBook.Info >Find the lowest price - Compare more then a hundred book stores in a = >click. >=20 >------=_NextPart_000_000B_01C587CF.C7353460-- -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/ RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire Linux, Java, perl, Solaris -- Consulting, Training, Development 4 - 8 - 15 - 16 - 23 - 42 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org