From 963ed59ad49c198c750b3ee251989b2793520840 Mon Sep 17 00:00:00 2001 From: Enrico Olivelli Date: Fri, 18 Sep 2020 16:35:14 +0200 Subject: [PATCH] remove useless conversion and extension point --- .../java/org/apache/openjpa/jdbc/sql/DBDictionary.java | 6 +----- .../org/apache/openjpa/jdbc/sql/HerdDBDictionary.java | 9 --------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index daadb7844..7a860955c 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -4462,7 +4462,7 @@ public class DBDictionary c.setSchemaIdentifier(fromDBName(colMeta.getString("TABLE_SCHEM"), DBIdentifierType.SCHEMA)); c.setTableIdentifier(fromDBName(colMeta.getString("TABLE_NAME"), DBIdentifierType.TABLE)); c.setIdentifier(fromDBName(colMeta.getString("COLUMN_NAME"), DBIdentifierType.COLUMN)); - c.setType(fromDBType(colMeta.getInt("DATA_TYPE"))); + c.setType(colMeta.getInt("DATA_TYPE")); c.setTypeIdentifier(fromDBName(colMeta.getString("TYPE_NAME"), DBIdentifierType.COLUMN_DEFINITION)); c.setSize(colMeta.getInt("COLUMN_SIZE")); c.setDecimalDigits(colMeta.getInt("DECIMAL_DIGITS")); @@ -5900,10 +5900,6 @@ public class DBDictionary return getNamingUtil().toDBName(name, delimit); } - public int fromDBType(int type) { - return type; - } - public DBIdentifier fromDBName(String name, DBIdentifierType id) { if (delimitAll()) { name = Normalizer.delimit(name, true); diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HerdDBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HerdDBDictionary.java index ca02c300e..a9377dc44 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HerdDBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HerdDBDictionary.java @@ -43,14 +43,5 @@ public class HerdDBDictionary setLeadingDelimiter(DELIMITER_BACK_TICK); setTrailingDelimiter(DELIMITER_BACK_TICK); } - - @Override - public int fromDBType(int i) { - if (i == Types.DOUBLE) { - return Types.REAL; - } - return i; - } - }