commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thorha...@apache.org
Subject cvs commit: jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder SqlBuilder.java
Date Mon, 23 Sep 2002 16:56:07 GMT
thorhauer    2002/09/23 09:56:06

  Modified:    sql/src/java/org/apache/commons/sql/builder SqlBuilder.java
  Log:
  adding support for default column values and making table and column protected
    so that they can be accessed in subclasses that need to override methods like
    createColumn
  
  Revision  Changes    Path
  1.9       +7 -2      jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/SqlBuilder.java
  
  Index: SqlBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/builder/SqlBuilder.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SqlBuilder.java	20 Sep 2002 20:34:38 -0000	1.8
  +++ SqlBuilder.java	23 Sep 2002 16:56:06 -0000	1.9
  @@ -118,10 +118,10 @@
       private boolean foreignKeyConstraintsNamed;
   
       /** The current Table we're working on */
  -    private Table table;
  +    protected Table table;
       
       /** The current Column we're working on */
  -    private Column column;
  +    protected Column column;
           
       public SqlBuilder() {
       }
  @@ -233,6 +233,11 @@
           print(" ");
           print(getSqlType(column));
           print(" ");
  +
  +        if (column.getDefaultValue() != null)
  +        {
  +          print("DEFAULT '" + column.getDefaultValue() + "' ");
  +        }
           if (column.isRequired()) {
               printNotNullable();
           }
  
  
  

--
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