0
 * 1.1 
 * 1.0  2005-10-24  CDH - First dated version for use with CP 11 
 * 
 * @author Ploski and Hanson 
 */ 
public class RDMSOS2200Dialect extends Dialect { 
 
    private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, RDMSOS2200Dialect.class.getName()); 
 
	public RDMSOS2200Dialect() { 
		super(); 
        // Display the dialect version. 
        LOG.rdmsOs2200Dialect(); 
 
        /** 
         * This section registers RDMS Biult-in Functions (BIFs) with Hibernate. 
         * The first parameter is the 'register' function name with Hibernate. 
         * The second parameter is the defined RDMS SQL Function and it's 
         * characteristics. If StandardSQLFunction(...) is used, the RDMS BIF 
         * name and the return type (if any) is specified.  If 
         * SQLFunctionTemplate(...) is used, the return type and a template 
         * string is provided, plus an optional hasParenthesesIfNoArgs flag. 
         */ 
		registerFunction( "abs", new StandardSQLFunction("abs") ); 
		registerFunction( "sign", new StandardSQLFunction("sign", StandardBasicTypes.INTEGER) ); 
 
		registerFunction("ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER) ); 
		registerFunction("char_length", new StandardSQLFunction("char_length", StandardBasicTypes.INTEGER) ); 
		registerFunction("character_length", new StandardSQLFunction("character_length", StandardBasicTypes.INTEGER) ); 
 
		// The RDMS concat() function only supports 2 parameters 
		registerFunction( "concat", new SQLFunctionTemplate(StandardBasicTypes.STRING, "concat(?1, ?2)") ); 
		registerFunction( "instr", new StandardSQLFunction("instr", StandardBasicTypes.STRING) ); 
		registerFunction( "lpad", new StandardSQLFunction("lpad", StandardBasicTypes.STRING) ); 
		registerFunction( "replace", new StandardSQLFunction("replace", StandardBasicTypes.STRING) ); 
		registerFunction( "rpad", new StandardSQLFunction("rpad", StandardBasicTypes.STRING) ); 
		registerFunction( "substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING) ); 
 
		registerFunction("lcase", new StandardSQLFunction("lcase") ); 
		registerFunction("lower", new StandardSQLFunction("lower") ); 
		registerFunction("ltrim", new StandardSQLFunction("ltrim") ); 
		registerFunction("reverse", new StandardSQLFunction("reverse") ); 
		registerFunction("rtrim", new StandardSQLFunction("rtrim") ); 
 
		// RDMS does not directly support the trim() function, we use rtrim() and ltrim() 
		registerFunction("trim", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "ltrim(rtrim(?1))" ) ); 
		registerFunction("soundex", new StandardSQLFunction("soundex") ); 
		registerFunction("space", new StandardSQLFunction("space", StandardBasicTypes.STRING) ); 
		registerFunction("ucase", new StandardSQLFunction("ucase") ); 
		registerFunction("upper", new StandardSQLFunction("upper") ); 
 
		registerFunction("acos", new StandardSQLFunction("acos", StandardBasicTypes.DOUBLE) ); 
		registerFunction("asin", new StandardSQLFunction("asin", StandardBasicTypes.DOUBLE) ); 
		registerFunction("atan", new StandardSQLFunction("atan", StandardBasicTypes.DOUBLE) ); 
		registerFunction("cos", new StandardSQLFunction("cos", StandardBasicTypes.DOUBLE) ); 
		registerFunction("cosh", new StandardSQLFunction("cosh", StandardBasicTypes.DOUBLE) ); 
		registerFunction("cot", new StandardSQLFunction("cot", StandardBasicTypes.DOUBLE) ); 
		registerFunction("exp", new StandardSQLFunction("exp", StandardBasicTypes.DOUBLE) ); 
		registerFunction("ln", new StandardSQLFunction("ln", StandardBasicTypes.DOUBLE) ); 
		registerFunction("log", new StandardSQLFunction("log", StandardBasicTypes.DOUBLE) ); 
		registerFunction("log10", new StandardSQLFunction("log10", StandardBasicTypes.DOUBLE) ); 
		registerFunction("pi", new NoArgSQLFunction("pi", StandardBasicTypes.DOUBLE) ); 
		registerFunction("rand", new NoArgSQLFunction("rand", StandardBasicTypes.DOUBLE) ); 
		registerFunction("sin", new StandardSQLFunction("sin", StandardBasicTypes.DOUBLE) ); 
		registerFunction("sinh", new StandardSQLFunction("sinh", StandardBasicTypes.DOUBLE) ); 
		registerFunction("sqrt", new StandardSQLFunction("sqrt", StandardBasicTypes.DOUBLE) ); 
		registerFunction("tan", new StandardSQLFunction("tan", StandardBasicTypes.DOUBLE) ); 
		registerFunction("tanh", new StandardSQLFunction("tanh", StandardBasicTypes.DOUBLE) ); 
 
		registerFunction( "round", new StandardSQLFunction("round") ); 
		registerFunction( "trunc", new StandardSQLFunction("trunc") ); 
		registerFunction( "ceil", new StandardSQLFunction("ceil") ); 
		registerFunction( "floor", new StandardSQLFunction("floor") ); 
 
		registerFunction( "chr", new StandardSQLFunction("chr", StandardBasicTypes.CHARACTER) ); 
		registerFunction( "initcap", new StandardSQLFunction("initcap") ); 
 
		registerFunction( "user", new NoArgSQLFunction("user", StandardBasicTypes.STRING, false) ); 
 
		registerFunction( "current_date", new NoArgSQLFunction("current_date", StandardBasicTypes.DATE, false) ); 
		registerFunction( "current_time", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIME, false) ); 
		registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIMESTAMP, false) ); 
		registerFunction("curdate", new NoArgSQLFunction("curdate",StandardBasicTypes.DATE) ); 
		registerFunction("curtime", new NoArgSQLFunction("curtime",StandardBasicTypes.TIME) ); 
		registerFunction("days", new StandardSQLFunction("days",StandardBasicTypes.INTEGER) ); 
		registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth",StandardBasicTypes.INTEGER) ); 
		registerFunction("dayname", new StandardSQLFunction("dayname",StandardBasicTypes.STRING) ); 
		registerFunction("dayofweek", new StandardSQLFunction("dayofweek",StandardBasicTypes.INTEGER) ); 
		registerFunction("dayofyear", new StandardSQLFunction("dayofyear",StandardBasicTypes.INTEGER) ); 
		registerFunction("hour", new StandardSQLFunction("hour",StandardBasicTypes.INTEGER) ); 
		registerFunction("last_day", new StandardSQLFunction("last_day",StandardBasicTypes.DATE) ); 
		registerFunction("microsecond", new StandardSQLFunction("microsecond",StandardBasicTypes.INTEGER) ); 
		registerFunction("minute", new StandardSQLFunction("minute",StandardBasicTypes.INTEGER) ); 
		registerFunction("month", new StandardSQLFunction("month",StandardBasicTypes.INTEGER) ); 
		registerFunction("monthname", new StandardSQLFunction("monthname",StandardBasicTypes.STRING) ); 
		registerFunction("now", new NoArgSQLFunction("now",StandardBasicTypes.TIMESTAMP) );