1 22 23 package org.xquark.extractor.progress.sql; 24 25 import org.xquark.extractor.sql.Context; 26 import org.xquark.extractor.sql.SqlExpression; 27 28 public class SfInStr extends org.xquark.extractor.sql.SqlFunction 29 { 30 31 private static final String RCSRevision = "$Revision: 1.4 $"; 32 private static final String RCSName = "$Name: $"; 33 34 35 public SfInStr() { 36 super("InStr"); 37 } 38 39 public SfInStr(SqlExpression arg0, SqlExpression arg1) { 40 super("SfContains"); 41 setArgument(0,arg0); 42 setArgument(1,arg1); 43 } 44 45 public String toSql(Context context) 46 { 47 49 StringBuffer retVal = new StringBuffer (); 50 retVal.append("INSTR("); 51 retVal.append(getArgument(0).toSql(context)); 52 retVal.append(", "); 53 retVal.append(getArgument(1).toSql(context)); 54 retVal.append(')'); 55 return retVal.toString(); 57 } 58 } 59 | Popular Tags |