Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-11-16 04:26:40 -0500
committerEike Stepper2012-11-16 04:26:40 -0500
commit09f5d478bbdc3a2740617c6d14caf8b25fb51e1f (patch)
tree60d5d368b1b94c5e80e10445160168c0ceb4813f
parentc89a032763ffb8f544b8443e2347a29184374819 (diff)
downloadcdo-09f5d478bbdc3a2740617c6d14caf8b25fb51e1f.tar.gz
cdo-09f5d478bbdc3a2740617c6d14caf8b25fb51e1f.tar.xz
cdo-09f5d478bbdc3a2740617c6d14caf8b25fb51e1f.zip
[344233] [DB] Get Max VARCHAR size from DBAdapter drops/I20121116-0445
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344233
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
index af703cc3a2..2b05c4ba3a 100644
--- a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
+++ b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
@@ -155,13 +155,24 @@ public class OracleAdapter extends DBAdapter
return "DATE";
case CHAR:
case VARCHAR:
- return "VARCHAR2(4000)";
+ return "VARCHAR2(" + field.getPrecision() + ")";
default:
return super.getTypeName(field);
}
}
@Override
+ public int getFieldLength(DBType type)
+ {
+ if (type == DBType.VARCHAR)
+ {
+ return 4000; // Oracle only supports 4000 for VARCHAR
+ }
+
+ return super.getFieldLength(type);
+ }
+
+ @Override
public DBType adaptType(DBType type)
{
if (type == DBType.BOOLEAN)

Back to the top