You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "CG Monroe (JIRA)" <ji...@apache.org> on 2006/10/11 00:45:20 UTC
[jira] Updated: (TORQUE-27) Need ability to pass global
user-configurable platform-specific hints to templates
[ http://issues.apache.org/jira/browse/TORQUE-27?page=all ]
CG Monroe updated TORQUE-27:
----------------------------
Attachment: XMLOptionsTagSupport.zip
XMLOptionTagSupports-Changelog.txt
Support for zero or more XML <option key=".." value=".."> tags to be nested in the database, column, index, unique, and forgeign-key tags. Intended to be a way that platform or custom information can be passed to templates.
E.g., statements like:
#if ( {table.getOption("mysql-table-type")})
${table.getOption("mysql-table-type")}
#end
Can be added into templates. Then the value for "mysql-table-type" can be defined in the schema XML like:
<table ....>
<option key="mysql-table-type" value="INNOB" />
....
</table>
> Need ability to pass global user-configurable platform-specific hints to templates
> ----------------------------------------------------------------------------------
>
> Key: TORQUE-27
> URL: http://issues.apache.org/jira/browse/TORQUE-27
> Project: Torque
> Issue Type: Improvement
> Components: Generator
> Affects Versions: 3.2
> Environment: Fedora Core 5 Linux, Sun JDK1.4.2_08.
> Reporter: Adrian Price
> Priority: Minor
> Attachments: XMLOptionsTagSupport.zip, XMLOptionTagSupports-Changelog.txt
>
>
> It would be useful to provide a generic mechanism to enable the user to pass global platform-specific hints to templates. For example, for MySQL it is desirable to explicitly specify the type of table to be created, e.g., CREATE TABLE foo (...) Type = InnoDB. Such global hints could then be specified by the user through platform specific properties or property files, as in:
> platform.properties:
> mysql.table.hint=Type = InnoDB.
> A matching table.vm template might look something like:
> # -----------------------------------------------------------------------
> # $table.Name
> # -----------------------------------------------------------------------
> $generator.parse("$basepath/drop.vm", "", "table", $tbl)
> CREATE TABLE $table.Name
> (
> etc...
> ) $platform.getProperty('mysql.table.hint');
> Without such a capability it is necessary to hard-code the required customizations into the templates, which is a rather inflexible and inconvenient way of doing it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org