db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql SqlUpdateStatement.java
Date Wed, 23 Nov 2005 20:08:33 GMT
brj         2005/11/23 12:08:33

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        SqlUpdateStatement.java
  Log:
  support quoted columns
  
  Revision  Changes    Path
  1.11      +7 -7      db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlUpdateStatement.java
  
  Index: SqlUpdateStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlUpdateStatement.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SqlUpdateStatement.java	10 Oct 2005 18:21:14 -0000	1.10
  +++ SqlUpdateStatement.java	23 Nov 2005 20:08:33 -0000	1.11
  @@ -41,9 +41,9 @@
   
   	/**
   	 * generates a SET-phrase for a prepared update statement.
  -	 * @param stmt the StringBuffer
  +	 * @param buf the StringBuffer
   	 */
  -	protected void appendSetClause(StringBuffer stmt)
  +	protected void appendSetClause(StringBuffer buf)
   	{
   		FieldDescriptor[] fields = getFieldsToUpdate();
   
  @@ -52,14 +52,14 @@
   			return;
   		}
   
  -		stmt.append(" SET ");
  +		buf.append(" SET ");
   		for (int i = 0; i < fields.length; i++)
   		{
  -			stmt.append(fields[i].getColumnName());
  -			stmt.append("=?");
  +            appendColumn(fields[i].getColumnName(), buf);
  +			buf.append("=?");
   			if (i < fields.length - 1)
   			{
  -				stmt.append(",");
  +				buf.append(",");
   			}
   		}
   	}
  
  
  

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


Mime
View raw message