empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From der...@apache.org
Subject empire-db git commit: EMPIREDB-249
Date Thu, 17 Nov 2016 14:35:55 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 4dd9b0fa3 -> 05ff572e4


EMPIREDB-249

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/05ff572e
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/05ff572e
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/05ff572e

Branch: refs/heads/master
Commit: 05ff572e450192f26cc1290b538b1ccd237de560
Parents: 4dd9b0f
Author: Jan Glaubitz <jan@glaubitz.org>
Authored: Thu Nov 17 15:31:57 2016 +0100
Committer: Jan Glaubitz <jan@glaubitz.org>
Committed: Thu Nov 17 15:35:33 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/05ff572e/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
b/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
index b758b74..81f9ee4 100644
--- a/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
+++ b/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
@@ -664,7 +664,10 @@ public class DBDatabaseDriverMySQL extends DBDatabaseDriver
            case DATETIME:  return "CAST(? AS DATETIME)";
            // Convert to text
            case TEXT:
-                return "CAST(? AS CHAR)";
+               if (format != null)
+               { // Convert using a format string
+                   return "CAST(? AS CHAR " + format.toString() + ")";
+               }
            case BLOB:
                 return "CAST(? AS BLOB)";
            // Unknown Type                                       


Mime
View raw message