db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r389303 - /db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java
Date Mon, 27 Mar 2006 22:08:58 GMT
Author: tfischer
Date: Mon Mar 27 14:08:57 2006
New Revision: 389303

URL: http://svn.apache.org/viewcvs?rev=389303&view=rev
Log:
Postgresql int2 columns have neither size nor scale

Modified:
    db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java
URL: http://svn.apache.org/viewcvs/db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java?rev=389303&r1=389302&r2=389303&view=diff
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/platform/PlatformPostgresqlImpl.java
Mon Mar 27 14:08:57 2006
@@ -46,9 +46,7 @@
         setSchemaDomainMapping(new Domain(SchemaType.SMALLINT, "INT2"));
         setSchemaDomainMapping(new Domain(SchemaType.BIGINT, "INT8"));
         setSchemaDomainMapping(new Domain(SchemaType.REAL, "FLOAT"));
-        // TODO check this .. just copied from db.props
         setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "CHAR"));
-        // TODO check this .. just copied from db.props
         setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT2"));
         setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "DOUBLE PRECISION"));
         setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT"));
@@ -75,4 +73,29 @@
         return "";
     }
 
+    /**
+     * @see Platform#hasScale(String)
+     * TODO collect info for all platforms
+     */
+    public boolean hasScale(String sqlType)
+    {
+        if ("INT2".equalsIgnoreCase(sqlType))
+        {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * @see Platform#hasSize(String)
+     * TODO collect info for all platforms
+     */
+    public boolean hasSize(String sqlType)
+    {
+         if ("INT2".equalsIgnoreCase(sqlType))
+        {
+            return false;
+        }
+        return true;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message