Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-27

Need ability to pass global user-configurable platform-specific hints to templates

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 3.3
    • Generator
    • None
    • Fedora Core 5 Linux, Sun JDK1.4.2_08.

    Description

      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:

      1. -----------------------------------------------------------------------
      2. $table.Name
      3. -----------------------------------------------------------------------
        $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.

      Attachments

        1. XMLOptionTagSupports-Changelog.txt
          1 kB
          CG Monroe
        2. XMLOptionsTagSupport.zip
          32 kB
          CG Monroe

        Activity

          People

            tfischer Thomas Fox
            adrianp Adrian Price
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: