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

Use Objects instead of Strings for Column constants in Peers and Criteria

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta1
    • Component/s: None
    • Labels:
      None

      Description

      Currently, column constants in Peers are Strings, and Criterias are constructed by using String column names.
      This means that code to parse column information (remove/add database/schema name, table name, remove SQL functions etc) is distributed across the code which is not very maintainable.

      Instead, column constants should be objects, which hold at least the following information

      • unqualified column name
      • table name (or reference to table)
      • database/schema name, if any, or reference to default database/schema name, if any
      • sql expression (in case it is different from [database/schema.]tableName.columnName, e.g. "cast id as varchar2(30)" in oracle)

      There should be a constructor taking a string input, which then tries to parse the given tsring and extract the above information from the string.

        Attachments

          Activity

            People

            • Assignee:
              tfischer Thomas Fox
              Reporter:
              tfischer Thomas Fox
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: