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はパーシステントレイヤーです。Torqueは、アプリケーションに必要なデータベースリソースを生成し、生成したクラスを実行させるための実行環境を含んでいます。

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はTurbineフレームワークの一部として発展してきましたが、Turbine2.2以降、現在に至ってはTurbineと切り離して使うことが可能になりました。

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は、目標データベースに対するSQLを生成するために、 XMLデータベーススキーマを示すTorque's Peer-based(訳者:訳語不明)オブジェクトリレーションモデルと、シングルXMLデータベーススキーマを使います。 更に、データベーススキーマを閲覧可能にしたいときには、データベースを記述しているHTMLドキュメントを生成することができます。

Torque offers an Ant build file (build-torque.xml) which could be added to your project . It defines the following targets:
TorqueはAntビルドファイル(build-torque.xml)を提供します。以下に目標を定義します。

  • sql
    generates SQL source from an XML schema describing a database structure
    データベース構造を記述しているXMLスキーマからSQLソースを生成します。

  • doc
    generates html or xml documentation for xml schemas
    XMLスキーマのXMLやHTMLのドキュメントを生成します。

  • create-db
    generates simple scripts for creating databases on various platforms.
    様々なプラットフォーム上のデータベースを作成するためのシンプルスクリプトを生成します。

  • datadtd
    generates data DTD from an XML schema describing a database structure
    データベース構造を記述しているXMLスキーマからDTD(データ)を生成します。

  • datadump
    dumping data from db into XML
    データベースからXMLへデータをダンプします。

  • datasql
    generates SQL source from an XML data file
    XMLデータファイルからSQLソースを生成します。

  • jdbc
    generates an XML schema of an existing database from JDBC metadata
    JDBCメタデータから現在のデータベースのXMLスキーマを生成します。

  • om
    generates output by using Velocity
    Velocityを用いてアウトプットを生成します。

  • insert-sql
    inserts a SQL file into its designated database
    指定されたデータベースにSQLファイルを挿入します。

  • sql2xml
    generates an xml schema from an sql schema
    SQLスキーマからXMLスキーマを生成します。

  • id-table-init-sql
    generates the initialization sql for the id table
    IDテーブルの初期化SQLを生成します。

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.
Torqueの実行環境は、生成されたOM/Peerクラスを使用するために必要なもの すべてを含んでいます。JDBCコネクションプールを含みます。

Supported RDBMS

RDBMS driver status tester
Axion org.axiondb.jdbc.AxionDriver alpha Martin Poeschl
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 untested 問題なし Martin Poeschl
Oracle oracle.jdbc.driver.OracleDriver untested 問題なし Martin Poeschl
Postgres org.postgresql.Driver untested 問題なし 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.
XMLスキーマタスクへのJDBCは適切にスキーマを生成しない。その他、問題なし
Jeffrey D. Brekke
Weblogic weblogic.jdbc.pool.Driver untested 未テスト

If your RDBMS is not listed here, please read the document about writing DB Adapters
ここに載っていないRDBMSについては、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.
RDBMSのテスターがなくヘルプを必要とするときには、developer-guideを読んで下さい。そして、テストを実行し、その結果をturbine-dev listへ送って下さい。