Author: tfischer
Date: Sat Feb 25 14:02:29 2012
New Revision: 1293607
URL: http://svn.apache.org/viewvc?rev=1293607&view=rev
Log:
- order database howtos alphabetically
- remove howtos for unsupported databases
- TORQUE-181: Support table create options in mysql
Added:
db/torque/torque4/trunk/torque-site/src/site/xdoc/version-specific/database-howtos/mysql-howto.xml
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/tableCreateOptions.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/tableCreateOptions.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/tableCreateOptions.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableCreateOptions.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.vm
Modified:
db/torque/torque4/trunk/torque-site/src/site/site.xml
Modified: db/torque/torque4/trunk/torque-site/src/site/site.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/site.xml?rev=1293607&r1=1293606&r2=1293607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/site.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/site.xml Sat Feb 25 14:02:29
2012
@@ -189,11 +189,11 @@
<menu name="Other Documentation">
<item name="Supported Databases"
href="/version-specific/supported-databases.html"/>
<item name="Database Howtos"
href="/version-specific/database-howtos/index.html" collapse="true">
+ <item name="HSQLDB"
href="/version-specific/database-howtos/hsqldb-howto.html"/>
<item name="MS SQL Server"
href="/version-specific/database-howtos/mssql-howto.html"/>
+ <item name="MySQL"
href="/version-specific/database-howtos/mysql-howto.html"/>
<item name="Oracle"
href="/version-specific/database-howtos/oracle-howto.html"/>
<item name="Postgres"
href="/version-specific/database-howtos/postgres-howto.html"/>
- <item name="Sybase"
href="/version-specific/database-howtos/sybase-howto.html"/>
- <item name="HSQLDB"
href="/version-specific/database-howtos/hsqldb-howto.html"/>
</item>
<item name="Other Howtos"
href="/version-specific/other-howtos/index.html" collapse="true">
<item name="Database Layout"
href="/version-specific/other-howtos/database-layout-howto.html"/>
Added:
db/torque/torque4/trunk/torque-site/src/site/xdoc/version-specific/database-howtos/mysql-howto.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/version-specific/database-howtos/mysql-howto.xml?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-site/src/site/xdoc/version-specific/database-howtos/mysql-howto.xml
(added)
+++
db/torque/torque4/trunk/torque-site/src/site/xdoc/version-specific/database-howtos/mysql-howto.xml
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+ <properties>
+ <title>MySQL Howto</title>
+ <author email="[email protected]">Torque Documentation Team</author>
+ </properties>
+
+<body>
+ <section name="MySQL Howto" >
+ <subsection name="Table create options">
+ <p>
+ The MySQL templates can handle create options for tables.
+ For example, the desired create-sql output is
+ </p>
+<source>
+CREATE TABLE book
+(
+ ...
+) COLLATE=latin1_german2_ci ENGINE=InnoDB;
+</source>
+ <p>
+ For this, specify the desired options in the option elements of the
+ table to create:
+ </p>
+<source>
+ <table name="book" description="Book table">
+ <option key="COLLATE" value="latin1_german2_ci"/>
+ <option key="ENGINE" value="InnoDB"/>
+ ...
+ </table>
+</source>
+ <p>
+ Torque recognizes the following keys to be separated with an equals
+ character("=") between key and value:
+ <ul>
+ <li>ENGINE</li>
+ <li>AVG_ROW_LENGTH</li>
+ <li>CHARACTER SET</li>
+ <li>DEFAULT CHARACTER SET</li>
+ <li>CHECKSUM</li>
+ <li>COLLATE</li>
+ <li>DEFAULT COLLATE</li>
+ <li>CONNECTION</li>
+ <li>DATA DIRECTORY</li>
+ <li>DELAY_KEY_WRITE</li>
+ <li>INDEX DIRECTORY</li>
+ <li>INSERT_METHOD</li>
+ <li>KEY_BLOCK_SIZE</li>
+ <li>MAX_ROWS</li>
+ <li>MIN_ROWS</li>
+ <li>PACK_KEYS</li>
+ <li>PASSWORD</li>
+ <li>ROW_FORMAT</li>
+ <li>TABLESPACE</li>
+ <li>UNION</li>
+ </ul>
+ </p>
+ <p>
+ Torque recognizes the following keys to be separated with a space
+ character(" ") between key and value:
+ <ul>
+ <li>PARTITION BY</li>
+ </ul>
+ </p>
+ <p>
+ All other keys are ignored.
+ </p>
+ </subsection>
+ </section>
+</body>
+</document>
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/derby/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,23 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## No table creation options are implemented.
+##
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/hsqldb/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,23 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## No table creation options are implemented.
+##
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,23 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## No table creation options are implemented.
+##
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,52 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## Creates the options for table creation.
+##
+#set ( $optionElements = $torqueGen.getSourceElement().getChildren("option") )
+#foreach ($optionElement in $optionElements)
+ #set ( $key = ${optionElement.getAttribute("key")})
+ #set ( $value = ${optionElement.getAttribute("value")})
+ #if ($key == "ENGINE"
+ || $key == "AVG_ROW_LENGTH"
+ || $key == "CHARACTER SET"
+ || $key == "DEFAULT CHARACTER SET"
+ || $key == "CHECKSUM"
+ || $key == "COLLATE"
+ || $key == "DEFAULT COLLATE"
+ || $key == "CONNECTION"
+ || $key == "DATA DIRECTORY"
+ || $key == "DELAY_KEY_WRITE"
+ || $key == "INDEX DIRECTORY"
+ || $key == "INSERT_METHOD"
+ || $key == "KEY_BLOCK_SIZE"
+ || $key == "MAX_ROWS"
+ || $key == "MIN_ROWS"
+ || $key == "PACK_KEYS"
+ || $key == "PASSWORD"
+ || $key == "ROW_FORMAT"
+ || $key == "TABLESPACE"
+ || $key == "UNION")
+ ${optionElement.getAttribute("key")}=${optionElement.getAttribute("value")}##
+ #else if($key == "PARTITION BY")
+ ${optionElement.getAttribute("key")} ${optionElement.getAttribute("value")}##
+ #end
+#end
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,23 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## No table creation options are implemented.
+##
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.vm?rev=1293607&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableCreateOptions.vm
Sat Feb 25 14:02:29 2012
@@ -0,0 +1,23 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## No table creation options are implemented.
+##
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]