cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/sql ColumnFormatter.java ConnectionDefs.java SQLProcessor.java
Date Thu, 03 Feb 2000 19:23:32 GMT
balld       00/02/03 11:23:32

  Modified:    src/org/apache/cocoon/processor/sql ColumnFormatter.java
                        ConnectionDefs.java SQLProcessor.java
  Log:
  Bug fixes for MS Access users.
  Submitted by:	Interesse Michelangelo <M.Interesse@netsiel.it>
  Reviewed by:	Donald Ball <balld@webslingerZ.com>
  
  Revision  Changes    Path
  1.3       +2 -3      xml-cocoon/src/org/apache/cocoon/processor/sql/ColumnFormatter.java
  
  Index: ColumnFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ColumnFormatter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ColumnFormatter.java	1999/12/08 07:37:08	1.2
  +++ ColumnFormatter.java	2000/02/03 19:23:31	1.3
  @@ -102,9 +102,8 @@
   		return format;
   	}
   
  -	protected void addColumnNode(Document document, Element parent, Column column, ResultSet
rs, int i) throws SQLException {
  +	protected void addColumnNode(Document document, Element parent, Column column, ResultSet
rs, int i, String value) throws SQLException {
   		String format = getFormat(column);
  -		String value;
   		if (format != null) {
   			if (column.type.equals("timestamp") || column.type.equals("time") || column.type.equals("date")
|| column.type.equals("datetime")) {
   				SimpleDateFormat date_format = new SimpleDateFormat(format);
  @@ -132,7 +131,7 @@
   				}
   			}
   		}
  -		parent.appendChild(document.createTextNode(rs.getString(i)));
  +		parent.appendChild(document.createTextNode(value));
   	}
   
   }
  
  
  
  1.6       +7 -3      xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java
  
  Index: ConnectionDefs.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConnectionDefs.java	1999/12/03 08:42:28	1.5
  +++ ConnectionDefs.java	2000/02/03 19:23:31	1.6
  @@ -57,7 +57,7 @@
    * Default connection values.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:28 $
  + * @version $Revision: 1.6 $ $Date: 2000/02/03 19:23:31 $
    */
   
   public class ConnectionDefs {
  @@ -184,9 +184,13 @@
   	}
   
       public Properties getQueryProperties(String name) {
  -        if (name == null || name.equals("")) return getQueryProperties();
  +        if (name == null || name.equals("")) {
  +			return getQueryProperties();
  +		}
   		Properties props = (Properties)query_props_table.get(name);
  -		if (props != null) return getQueryProperties();
  +		if (props == null) {
  +			return getQueryProperties();
  +		}
   		return (Properties)props.clone();
       }
   
  
  
  
  1.8       +2 -2      xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java
  
  Index: SQLProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SQLProcessor.java	1999/12/08 07:37:08	1.7
  +++ SQLProcessor.java	2000/02/03 19:23:31	1.8
  @@ -62,7 +62,7 @@
    * A processor that performs SQL database queries.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version $Revision: 1.7 $ $Date: 1999/12/08 07:37:08 $
  + * @version $Revision: 1.8 $ $Date: 2000/02/03 19:23:31 $
    */
   
   public class SQLProcessor extends AbstractActor implements Processor, Status {
  @@ -279,7 +279,7 @@
                               column_element.setAttribute("NULL","YES");
                               column_element.appendChild(document.createTextNode(""));
                           } else {
  -							formatter.addColumnNode(document,column_element,columns[i],rs,i+1);
  +							formatter.addColumnNode(document,column_element,columns[i],rs,i+1,value);
                           }
                           row_node.appendChild(column_element);
                       }
  
  
  

Mime
View raw message