Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-163

make column label name display instead column name when useOldAliasMetadataBehavior option true

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.9
    • 1.2.2
    • Other
    • None
    • ALL
    • Sprint connector/j 1.3.0

    Description

      Like CONJ-149, column alias display feature need.

      as_is

      select col_1 as col_A from test_table;
      :  getColumnName return col_1
       

      i need feature about useOldAliasMetadataBehavior option (like CONJ-149 TABLE)
      when useOldAliasMetadataBehavior is true

      select col_1 as col_A from test_table;
      :  getColumnName return col_A

      that make column label name display instead column name when useOldAliasMetadataBehavior option true

      how about my idea,
      and sample my code is below

      MySQLResultSetMetaData.java

       public String getColumnName(final int column) throws SQLException {
              String s =  getColumnInformation(column).getOriginalName();      
      +        if (returnTableAlias == true)    // if useOldAliasMetadataBehavior=true then getColumnName return getCoulmnLabel
      +         s =  getColumnLabel(column); 
            
              if ("".equals(s))  // odd things that are no columns, e.g count(*)
                  s =  getColumnLabel(column);
              return s;
          }

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              seung hoon seung hoon yoo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.