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
        Type: Improvement

  Components: Generator  
    Versions: 3.2    
 Environment: Fedora Core 5 Linux, Sun JDK1.4.2_08.
    Reporter: Adrian Price
    Priority: Minor


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to