summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-24 12:36:55 (EDT)
committerEike Stepper2007-08-24 12:36:55 (EDT)
commit4edac8339da2462e68d9b3142b961e555c67121c (patch)
tree3e0d2836b31b4deaf424cdc0607e3bcad8e51174
parent2ab981e4037d757db98fa80d29fa197fb55c3d04 (diff)
downloadcdo-4edac8339da2462e68d9b3142b961e555c67121c.zip
cdo-4edac8339da2462e68d9b3142b961e555c67121c.tar.gz
cdo-4edac8339da2462e68d9b3142b961e555c67121c.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java44
1 files changed, 13 insertions, 31 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
index 2d9ddc8..23a607f 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
@@ -16,36 +16,9 @@ public enum DBType
DOUBLE(8), //
NUMERIC(2), //
DECIMAL(3), //
- CHAR(1)
- {
- @Override
- public void appendValue(StringBuilder builder, Object value)
- {
- builder.append("'");
- builder.append(value);
- builder.append("'");
- }
- }, //
- VARCHAR(12)
- {
- @Override
- public void appendValue(StringBuilder builder, Object value)
- {
- builder.append("'");
- builder.append(value);
- builder.append("'");
- }
- }, //
- LONGVARCHAR(-1, "LONG VARCHAR")
- {
- @Override
- public void appendValue(StringBuilder builder, Object value)
- {
- builder.append("'");
- builder.append(value);
- builder.append("'");
- }
- }, //
+ CHAR(1), //
+ VARCHAR(12), //
+ LONGVARCHAR(-1, "LONG VARCHAR"), //
DATE(91), //
TIME(92), //
TIMESTAMP(93), //
@@ -129,7 +102,16 @@ public enum DBType
}
else
{
- builder.append(value);
+ if (value instanceof String || value instanceof Character)
+ {
+ builder.append("'");
+ builder.append(value);
+ builder.append("'");
+ }
+ else
+ {
+ builder.append(value);
+ }
}
}
} \ No newline at end of file