You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "jan (JIRA)" <em...@incubator.apache.org> on 2016/11/17 14:36:59 UTC
[jira] [Resolved] (EMPIREDB-249) Add "format" Support to MySQL
convert expression
[ 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)