commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/dynabean DynaSql.java
Date Mon, 28 Oct 2002 16:17:13 GMT
jstrachan    2002/10/28 08:17:13

  Modified:    sql/src/java/org/apache/commons/sql/builder
                        PostgreSqlBuilder.java AxionBuilder.java
               sql/src/java/org/apache/commons/sql/dynabean DynaSql.java
  Log:
  applied J. Russell Smyth 's patches
  
  various minor patches to ensure things still work with the slight modificaitons to the model
  
  Revision  Changes    Path
  1.3       +4 -4      jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/PostgreSqlBuilder.java
  
  Index: PostgreSqlBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/PostgreSqlBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PostgreSqlBuilder.java	23 Sep 2002 16:53:24 -0000	1.2
  +++ PostgreSqlBuilder.java	28 Oct 2002 16:17:11 -0000	1.3
  @@ -116,13 +116,13 @@
        */
       protected String getSqlType(Column column) {
   
  -        if (column.getTypeString().equalsIgnoreCase("VARBINARY"))
  +        if (column.getTypeCode() == java.sql.Types.VARBINARY)
           {
               return "OID";
           }
           else
           {
  -            return column.getTypeString();
  +            return super.getSqlType(column);
           }
       }
   
  
  
  
  1.4       +2 -0      jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/AxionBuilder.java
  
  Index: AxionBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/AxionBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AxionBuilder.java	23 Sep 2002 16:55:18 -0000	1.3
  +++ AxionBuilder.java	28 Oct 2002 16:17:11 -0000	1.4
  @@ -70,6 +70,7 @@
   import org.apache.commons.sql.model.Column;
   import org.apache.commons.sql.model.Database;
   import org.apache.commons.sql.model.Table;
  +import org.apache.commons.sql.model.TypeMap;
   
   /**
    * An SQL Builder for the <a href="http://axion.tigris.org/">Axion</a> JDBC
database.
  @@ -88,6 +89,7 @@
           // Axion doesn't support text width specification 
           return column.getType();
       }
  +    
       protected void writePrimaryKeys(Table table) throws IOException {
           // disable primary key constraints
       }
  
  
  
  1.8       +1 -1      jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/dynabean/DynaSql.java
  
  Index: DynaSql.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/dynabean/DynaSql.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DynaSql.java	18 Oct 2002 00:33:16 -0000	1.7
  +++ DynaSql.java	28 Oct 2002 16:17:12 -0000	1.8
  @@ -544,7 +544,7 @@
   
           Object value = dynaBean.get(property.getName());
           if (value == null) {
  -            statement.setNull(sqlIndex, property.getColumn().getSQLTypeCode());
  +            statement.setNull(sqlIndex, property.getColumn().getTypeCode());
           }
           else {
               statement.setObject(sqlIndex, value);
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message