qcubed/framework

View on GitHub
travis/codegen_settings.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8" ?>
<codegen>
<!--
    This XML file defines the settings used when running the Code Generator.
    When running CodeGen, you must specify a CodeGenSettings XML file like
    this one to use.  Feel free to copy, modify, etc.
-->
    <!-- General CodeGen Settings -->
    <name application="My QCubed Application"/>
    <templateEscape begin="&lt;%" end="%&gt;"/>

    <!--
    createMethod: specify either queryString or pathInfo.
    buttonClass: The default class to use for generated buttons.
    preferredRenderMethod: The default render method to use for objects in the model connector.
    -->
    <formgen
            createMethod="queryString"
            buttonClass="QJqButton"
            preferredRenderMethod = "RenderWithName"
            />

    <!-- Define Data Sources (e.g. Databases, Services, etc.) -->
    <dataSources>
        <database index="1">
            <!-- Append Prefixes/Suffixes to the Following Code Generated Items -->
            <className prefix="" suffix=""/>
            <associatedObjectName prefix="" suffix=""/>

            <!-- Table Type Identifiers - Used to Classify Tables in your Data Model -->

            <!-- If you want to use multiple type table identifiers, separate them by commas -->
            <typeTableIdentifier suffix="_type"/>

            <associationTableIdentifier suffix="_assn"/>

            <!-- Other -->
            <stripFromTableName prefix=""/>
            
            <!-- Whether to automatically initialize new objects with default values from database definition -->
            <createOptions autoInitialize="true" />

            <!-- Specific Tables to Exclude or Include in the CodeGen process -->
            <!--
                    * "include" is used to override any "exclude" patterns or lists
                    * "list" should be a  comma-separated list of table names
                    * "pattern" is a regexp pattern
                So for example, if you only want to codegen any table prefixed with "qc_",
                you should set an excludeTables pattern to exclude all, or "[0-9a-zA-Z_]*".
                And then you should set an includeTables pattern of "^qc_[0-9a-zA-Z_]*".
            -->
            <excludeTables pattern="" list="qc_watchers"/>
            <includeTables pattern="" list=""/>

            <!-- Support for "Beta 2" version of Manual Queries and Hard Coded Column Names -->
            <manualQuery support="false"/>

            <!--
                This feature allows you to use the comments made on the column of database table to be used as
                the label text generated for model connectors (used in form drafts as the text in front of the input control).
                If you do not want to use this feature, leave the delimiter as blank. Also, you cannot set it to be a whitespace (a sequence of space characters, or tabs or newlines); under such case, it behaves as if it has been left blank.

                Behavior (assumes "::" (without the quotes) as the character sequence used for delimiter):
                    1. If you enable this feature but do not want to use the comment as the model connector label, make sure that you are not going to use the delimiter in the comment.
                       e.g. a comment like "The weight of the object" will not make use of this feature and your column property name will be used as the model connector label.
                    2. In case you HAVE TO use the delimiter in the column comment, please prepend the comment with the delimiter. eg. a
                       comment like "The ratio (::) of weight to cost" will put the string "The ratio (" as the model connector label. To prevent this, write the same comment as ":: The ratio (::) of weight to cost".
                    3. If the delimiter occurs multiple times in the comment on the column, only the part before the first occurrence is taken as the label for model connector (this also explains the behavior of the above point).
            -->
            <columnCommentForModelConnector delimiter="" />
            <!-- Virtual Foreign Key Relationships -->
            <!--
                There are two ways to define relationships.  To signify a virtual FK
                relationship (for example, on foo.bar_id which would key to bar.id)
                you can:

                A) Simply define the relationship in the <relationships/> tag using
                   the following format:
                    foo.bar_id => bar.id
                    bar.other_id => other.id
                    (with one relationship per line)
                   Note that because the relationships data uses a ">" symbol, proper
                   XML rules dictate that the content of the relationships script must
                   be escaped with <![CDATA[ and ]]> tags.

                B) You can define the relationships in totally separate relationships
                   script file by using the <relationshipsScript/> tag, where you can
                   specify a filepath and a format.  Format can either be:
                    qcubed - follows the same "foo.bar_id => bar.id" as above
                    sql - parses the script, looking for SQL-based ALTER TABLE statments like:
                        ALTER TABLE foo ADD CONSTRAINT blah FOREIGN KEY (bar_id) REFERENCES bar (id);
            -->
            <relationships><![CDATA[
            ]]></relationships>
            <relationshipsScript filepath="" format="sql"/>
        </database>
    </dataSources>
</codegen>