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

Index-column size attribute is documented but does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3-RC2
    • Fix Version/s: 4.0-beta1
    • Component/s: Generator
    • Labels:
      None

      Description

      The database schema allows a "size" attribute for the "index-column" element which did not make it into neither the Index code nor the templates. Some databases support this parameter, however (namely MySQL). The attribute should be utilized where supported by the database.

        Activity

        Hide
        monroe CG Monroe added a comment -

        I'm not sure I agree with the proposed resolution. IMHO, the schema should be SQL standards / defacto standards based and not have any DB specific attributes. (FWIW, it appears that CREATE INDEX is a defacto standard... I'd describe a defacto standard as one shown to be supported by most of of DB servers Torque supports. )

        With this in mind, the solution to this would seem to be:

        1) Deprecate the size attribute (and remove it in 4.0?).

        2) If this seems like a good feature to add into Torque, add support for it via that option element which is intended to support DB Server specific items.

        But for 2) we'd have to think about how to support / test these DB Specific items prior to release, how to document them, and how to deal with possible DB Vendor changes between versions. So should this be Torque "core" or an "add-on"?

        Show
        monroe CG Monroe added a comment - I'm not sure I agree with the proposed resolution. IMHO, the schema should be SQL standards / defacto standards based and not have any DB specific attributes. (FWIW, it appears that CREATE INDEX is a defacto standard... I'd describe a defacto standard as one shown to be supported by most of of DB servers Torque supports. ) With this in mind, the solution to this would seem to be: 1) Deprecate the size attribute (and remove it in 4.0?). 2) If this seems like a good feature to add into Torque, add support for it via that option element which is intended to support DB Server specific items. But for 2) we'd have to think about how to support / test these DB Specific items prior to release, how to document them, and how to deal with possible DB Vendor changes between versions. So should this be Torque "core" or an "add-on"?
        Hide
        tv Thomas Vandahl added a comment -

        I can live with 1), anytime. The point is, documented attributes/elements should work or the attribute including docs should be removed, there is no in between. I found that most of the databases I checked do not support limiting the size of an index column directly, everything else is vendor specific. So basically, +1 for removing said attribute from the schema.

        Show
        tv Thomas Vandahl added a comment - I can live with 1), anytime. The point is, documented attributes/elements should work or the attribute including docs should be removed, there is no in between. I found that most of the databases I checked do not support limiting the size of an index column directly, everything else is vendor specific. So basically, +1 for removing said attribute from the schema.
        Hide
        tfischer Thomas Fox added a comment -

        If the size attribute is a quasi-standard, then we should keep it. A short glance at the postgresql and derby manuals suggest that it's not a quasi-standard, so 1) seems the correct way to go for me.

        Show
        tfischer Thomas Fox added a comment - If the size attribute is a quasi-standard, then we should keep it. A short glance at the postgresql and derby manuals suggest that it's not a quasi-standard, so 1) seems the correct way to go for me.
        Hide
        tfischer Thomas Fox added a comment -

        I added a note to the database dtd, the schema reference and the changes that the element is not used and will be removed in the future.
        Leaving this issue open so we remember removing the attribute after 3.3 is out.

        Show
        tfischer Thomas Fox added a comment - I added a note to the database dtd, the schema reference and the changes that the element is not used and will be removed in the future. Leaving this issue open so we remember removing the attribute after 3.3 is out.
        Hide
        tfischer Thomas Fox added a comment -

        Resolved in the transition from database.dtd to database.xsd

        Show
        tfischer Thomas Fox added a comment - Resolved in the transition from database.dtd to database.xsd

          People

          • Assignee:
            Unassigned
            Reporter:
            tv Thomas Vandahl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development