empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jan (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Resolved] (EMPIREDB-249) Add "format" Support to MySQL convert expression
Date Thu, 17 Nov 2016 14:36:59 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jan resolved EMPIREDB-249.
--------------------------
    Resolution: Fixed

I added

           case TEXT:
               if (format != null)
               { // Convert using a format string
                   return "CAST(? AS CHAR " + format.toString() + ")";
               }

to getConvertPhrase, now you can use it like

col.convertTo(DataType.TEXT, "CHARACTER SET cp1250")

which results in 

SELECT CAST(t1.test AS CHAR CHARACTER SET cp1250)
FROM TEST t1

Added in commit 75b429bd2cbddd070299ada8ad6c41104c13cad1



> Add "format" Support to MySQL convert expression
> ------------------------------------------------
>
>                 Key: EMPIREDB-249
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-249
>             Project: Empire-DB
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: empire-db-2.4.5
>            Reporter: jan
>            Assignee: jan
>            Priority: Minor
>             Fix For: empire-db-2.4.6
>
>
> Currently its not possible to specify e. g. the 'CHARACTER SET' for a conversion to DataType.TEXT
when using MySQL.
> To achieve this, its necessary to add support for "format" DBDatabaseDriverMySQL.getConvertPhrase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message