db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Torque:datasql
Date Thu, 17 Nov 2005 16:44:59 GMT
This target is closely tied to the datadtd and datadump targets. 

If you run datadtd against your project schema, you will get a 
<project>-data.dtd file that defines table specific XML format.

If you run datadump, against a DB server with populated tables 
(defined in your in your project schema), you will get a 
<project>-data.xml file that contains the dumped data in an XML
format that matches the <project>-data.xml.

Then if you run the datasql target when you have these two file
available, you will get an data insert SQL script.

One issue to note is that if you have any autoIncrement fields
defined, many DB implimentations will not let you insert values
into these fields unless you do something special.  For example,
MySQL requires the use of "REPLACE" instead of "INSERT" and 
MS SQL requires INSERT statements that do this to first do
SET IDENTITY_INSERT <table> ON and once all the statements are 
done to do SET IDENTITY_INSERT <table> OFF.

> -----Original Message-----
> From: Jakub Piechnik
> Where can I find more information about this goal in maven plugin - I 
> assume that I can put my data into xml file - and from that 
> file torque  will generate a sql file with data inserting. But what
should be the 
> format in xml file?

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message