1 22 23 package org.xquark.extractor.mysql.sql; 24 25 26 import java.util.List ; 27 28 import org.xquark.extractor.common.Debug; 29 import org.xquark.extractor.sql.Context; 30 import org.xquark.extractor.sql.SqlExpression; 31 32 public class SfConcat extends org.xquark.extractor.sql.SfConcat 33 { 34 35 private static final String RCSRevision = "$Revision: 1.3 $"; 36 private static final String RCSName = "$Name: $"; 37 38 39 public SfConcat() { 40 super(); 41 } 42 43 public SfConcat(List arguments) { 44 super(arguments); 45 } 46 47 public String toSql (Context context) 48 { 49 51 StringBuffer retVal = new StringBuffer (); 52 retVal.append("CONCAT("); 53 List args = getArguments(); 54 Debug.assertTrue( 1<args.size(),"1<args.size()"); 55 56 for (int i = 0; i < args.size(); i++) { 57 if (i!=0) retVal.append(","); 58 SqlExpression item = (SqlExpression)args.get(i); 59 retVal.append(item.toSql(context)); 60 } 62 retVal.append(")"); 64 65 return retVal.toString(); 67 } 68 69 } 70 | Popular Tags |