db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/src/generator/src/templates/sql/base/oracle comment.vm table.vm
Date Tue, 14 Jun 2005 20:09:08 GMT
tfischer    2005/06/14 13:09:08

  Modified:    src/generator/src/templates/sql/base/msaccess table.vm
               src/generator/src/templates/sql/base/sybase table.vm
               src/generator/src/templates/sql/base/db2 table.vm
               src/generator/src/templates/sql/base/postgresql table.vm
               src/generator/src/templates/sql/base/oracle table.vm
  Added:       src/generator/src/templates/sql/base/msaccess comment.vm
               src/generator/src/templates/sql/base/sybase comment.vm
               src/generator/src/templates/sql/base/db2 comment.vm
               src/generator/src/templates/sql/base/postgresql comment.vm
               src/generator/src/templates/sql/base/oracle comment.vm
  Log:
  Added templates to add the table and column description as a comment into the database.
See TRQS266
  The affected databases are db2, msaccess, oracle, postgresql, sybase
  tested for postgresql, will test for oracle tomorrow.
  
  Thanks to Ben Litchfield for the suggestion and for providing the SQL
  
  Revision  Changes    Path
  1.2       +2 -0      db-torque/src/generator/src/templates/sql/base/msaccess/table.vm
  
  Index: table.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/msaccess/table.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.vm	10 Feb 2003 13:18:48 -0000	1.1
  +++ table.vm	14 Jun 2005 20:09:08 -0000	1.2
  @@ -18,3 +18,5 @@
   );
   
   #if($index.length() > 0)$strings.chop($index,1)#end
  +
  +$generator.parse("$basepath/comment.vm", "", "table", $tbl)
  
  
  
  1.1                  db-torque/src/generator/src/templates/sql/base/msaccess/comment.vm
  
  Index: comment.vm
  ===================================================================
  #if ($table.description.length() > 0)
  addtbllabl T=$table.Name L="$table.description";
  #end
  
  #foreach ($col in $table.Columns)
  #if ($col.description.length() > 0)
  addcollabl T=${col.tableName} C=${col.name} L="$col.description";
  #end
  #end
  
  
  1.2       +2 -0      db-torque/src/generator/src/templates/sql/base/sybase/table.vm
  
  Index: table.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/sybase/table.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.vm	10 Feb 2003 13:18:44 -0000	1.1
  +++ table.vm	14 Jun 2005 20:09:08 -0000	1.2
  @@ -17,3 +17,5 @@
   
   #set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) )
   #if($index.length() > 0)$index#end
  +
  +$generator.parse("$basepath/comment.vm", "", "table", $tbl)
  
  
  
  1.1                  db-torque/src/generator/src/templates/sql/base/sybase/comment.vm
  
  Index: comment.vm
  ===================================================================
  #if ($table.description.length() > 0)
  COMMENT ON TABLE $table.Name IS '$table.description';
  #end
  
  #foreach ($col in $table.Columns)
  #if ($col.description.length() > 0)
  COMMENT ON COLUMN ${col.tableName}.${col.name} IS '$col.description';
  #end
  #end
  
  
  1.2       +2 -0      db-torque/src/generator/src/templates/sql/base/db2/table.vm
  
  Index: table.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/db2/table.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.vm	10 Feb 2003 13:18:45 -0000	1.1
  +++ table.vm	14 Jun 2005 20:09:08 -0000	1.2
  @@ -23,3 +23,5 @@
   
   ##set $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl)
   ##if ($sequence.length()>0)$sequence#end
  +
  +$generator.parse("$basepath/comment.vm", "", "table", $tbl)
  
  
  
  1.1                  db-torque/src/generator/src/templates/sql/base/db2/comment.vm
  
  Index: comment.vm
  ===================================================================
  #if ($table.description.length() > 0)
  COMMENT ON TABLE $table.Name IS '$table.description';
  #end
  
  #foreach ($col in $table.Columns)
  #if ($col.description.length() > 0)
  COMMENT ON COLUMN ${col.tableName}.${col.name} IS '$col.description';
  #end
  #end
  
  
  1.4       +1 -0      db-torque/src/generator/src/templates/sql/base/postgresql/table.vm
  
  Index: table.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/postgresql/table.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- table.vm	27 Mar 2005 07:52:12 -0000	1.3
  +++ table.vm	14 Jun 2005 20:09:08 -0000	1.4
  @@ -20,3 +20,4 @@
   );
   #if($index.length() > 0)$strings.chop($index,1)#end
   
  +$generator.parse("$basepath/comment.vm", "", "table", $tbl)
  
  
  
  1.1                  db-torque/src/generator/src/templates/sql/base/postgresql/comment.vm
  
  Index: comment.vm
  ===================================================================
  #if ($table.description.length() > 0)
  COMMENT ON TABLE $table.Name IS '$table.description';
  #end
  
  #foreach ($col in $table.Columns)
  #if ($col.description.length() > 0)
  COMMENT ON COLUMN ${col.tableName}.${col.name} IS '$col.description';
  #end
  #end
  
  
  1.2       +2 -0      db-torque/src/generator/src/templates/sql/base/oracle/table.vm
  
  Index: table.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/oracle/table.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.vm	10 Feb 2003 13:18:47 -0000	1.1
  +++ table.vm	14 Jun 2005 20:09:08 -0000	1.2
  @@ -20,3 +20,5 @@
   
   #set ( $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) )
   #if ($sequence.length()>0)$sequence#end
  +
  +$generator.parse("$basepath/comment.vm", "", "table", $tbl)
  
  
  
  1.1                  db-torque/src/generator/src/templates/sql/base/oracle/comment.vm
  
  Index: comment.vm
  ===================================================================
  #if ($table.description.length() > 0)
  COMMENT ON TABLE $table.Name IS '$table.description';
  #end
  
  #foreach ($col in $table.Columns)
  #if ($col.description.length() > 0)
  COMMENT ON COLUMN ${col.tableName}.${col.name} IS '$col.description';
  #end
  #end
  
  

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