Torque

Torque

Guides

Howto Guides

Development

What is Torque?

Torque is a persistence layer. Torque generates all the database resources required by your application and includes a runtime environment to run the generated classes.

Torque was developed as part of the Turbine Framework. It is now decoupled and can be used by itself. Starting with version 2.2 Turbine will use the decoupled Torque.

Torque's generation tasks

Torque uses a single XML database schema to generate the SQL for your target database and Torque's Peer-based object relation model representing your XML database schema. Additionally, an HTML document describing the database can be generated if you wish to make a browseable version of the database schema.

Torque offers the following Ant tasks:

  • TorqueCreateDatabase
    generates simple scripts for creating databases on various platforms.
  • TorqueDataDTDTask
    generates data DTD from an XML schema describing a database structure
  • TorqueDataDumpTask
    dumping data from db into XML
  • TorqueDataSQLTask
    generates SQL source from an XML data file
  • TorqueJDBCTransformTask
    generates an XML schema of an existing database from JDBC metadata
  • TorqueObjectModelTask
    generates output by using Velocity
  • TorqueSQLExecTask
    inserts a SQL file into its designated database
  • TorqueSQLTask
    generates SQL source from an XML schema describing a database structure
  • TorqueSQLTransformTask
    generates an xml schema from an sql schema
  • TorqueDocumentationTask
    generates html or xml documentation for xml schemas


Torque's runtime environment

Torque's runtime environment includes everything you need to use the generated OM/Peer classes. It includes a jdbc connection pool.



Supported RDBMS
RDBMS driver status tester
Cloudscape COM.cloudscape.core.JDBCDriver untested  
DB2 COM.ibm.db2.jdbc.{app|net}.DB2Driver untested  
DB2/AS400 com.ibm.as400.access.AS400JDBCDriver possible case-insensitivity issues Scott Weaver
Hypersonic org.hsql.jdbcDriver untested  
Informix ??? untested  
InstantDB org.enhydra.instantdb.jdbc.idbDriver untested  
Interbase interbase.interclient.Driver untested  
MS SQL com.microsoft.jdbc.sqlserver.SQLServerDriver untested  
Mysql org.gjt.mm.mysql.Driver no known problems Martin Poeschl
Oracle oracle.jdbc.driver.OracleDriver no known problems Martin Poeschl
Postgres org.postgresql.Driver no known problems Martin Poeschl
SapDB com.sap.dbtech.jdbc.DriverSapDB untested  
Sybase com.sybase.jdbc2.jdbc.SybDriver JDBCToXMLSchema task will not generate the schema properly. All other tests pass. Jeffrey D. Brekke
Weblogic weblogic.jdbc.pool.Driver untested  

If your RDBMS is not listed here, please read the document about writing DB Adapters

If there is no tester for your RDBMS and you want to help, please read the developer-guide, run the tests and send your results (and bugfixes ;) to the turbine-dev list.



Copyright © 1999-2002, Apache Software Foundation