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