registerFunction( "cot", new StandardJDBCEscapeFunction( "cot", Hibernate.DOUBLE ) );
registerFunction( "coalesce", new VarArgsSQLFunction( "coalesce(", ",", ")" ) );
registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "", "||", "" ) );
registerFunction( "convert", new ConvertFunction() );
registerFunction( "curdate", new StandardJDBCEscapeFunction( "curdate", Hibernate.DATE ) );
registerFunction( "current_date", new NoArgSQLFunction( "current_date", Hibernate.DATE, false ) );
registerFunction( "current_time", new NoArgSQLFunction( "current_time", Hibernate.TIME, false ) );
registerFunction(
"current_timestamp", new ConditionalParenthesisFunction( "current_timestamp", Hibernate.TIMESTAMP )
);
registerFunction( "curtime", new StandardJDBCEscapeFunction( "curtime", Hibernate.TIME ) );
registerFunction( "database", new StandardJDBCEscapeFunction( "database", Hibernate.STRING ) );
registerFunction( "dateadd", new VarArgsSQLFunction( Hibernate.TIMESTAMP, "dateadd(", ",", ")" ) );
registerFunction( "datediff", new VarArgsSQLFunction( Hibernate.INTEGER, "datediff(", ",", ")" ) );
registerFunction( "datename", new VarArgsSQLFunction( Hibernate.STRING, "datename(", ",", ")" ) );
registerFunction( "datepart", new VarArgsSQLFunction( Hibernate.INTEGER, "datepart(", ",", ")" ) );
registerFunction( "day", new StandardSQLFunction( "day", Hibernate.INTEGER ) );
registerFunction( "dayname", new StandardJDBCEscapeFunction( "dayname", Hibernate.STRING ) );
registerFunction( "dayofmonth", new StandardJDBCEscapeFunction( "dayofmonth", Hibernate.INTEGER ) );
registerFunction( "dayofweek", new StandardJDBCEscapeFunction( "dayofweek", Hibernate.INTEGER ) );
registerFunction( "dayofyear", new StandardJDBCEscapeFunction( "dayofyear", Hibernate.INTEGER ) );
// is it necessary to register %exact since it can only appear in a where clause?
registerFunction( "%exact", new StandardSQLFunction( "%exact", Hibernate.STRING ) );
registerFunction( "exp", new StandardJDBCEscapeFunction( "exp", Hibernate.DOUBLE ) );
registerFunction( "%external", new StandardSQLFunction( "%external", Hibernate.STRING ) );
registerFunction( "$extract", new VarArgsSQLFunction( Hibernate.INTEGER, "$extract(", ",", ")" ) );
registerFunction( "$find", new VarArgsSQLFunction( Hibernate.INTEGER, "$find(", ",", ")" ) );
registerFunction( "floor", new StandardSQLFunction( "floor", Hibernate.INTEGER ) );
registerFunction( "getdate", new StandardSQLFunction( "getdate", Hibernate.TIMESTAMP ) );
registerFunction( "hour", new StandardJDBCEscapeFunction( "hour", Hibernate.INTEGER ) );
registerFunction( "ifnull", new VarArgsSQLFunction( "ifnull(", ",", ")" ) );
registerFunction( "%internal", new StandardSQLFunction( "%internal" ) );
registerFunction( "isnull", new VarArgsSQLFunction( "isnull(", ",", ")" ) );
registerFunction( "isnumeric", new StandardSQLFunction( "isnumeric", Hibernate.INTEGER ) );
registerFunction( "lcase", new StandardJDBCEscapeFunction( "lcase", Hibernate.STRING ) );
registerFunction( "left", new StandardJDBCEscapeFunction( "left", Hibernate.STRING ) );
registerFunction( "len", new StandardSQLFunction( "len", Hibernate.INTEGER ) );
registerFunction( "length", new StandardSQLFunction( "length", Hibernate.INTEGER ) );
registerFunction( "$length", new VarArgsSQLFunction( "$length(", ",", ")" ) );
// aggregate functions shouldn't be registered, right?
//registerFunction( "list", new StandardSQLFunction("list",Hibernate.STRING) );
// stopped on $list
registerFunction( "$list", new VarArgsSQLFunction( "$list(", ",", ")" ) );
registerFunction( "$listdata", new VarArgsSQLFunction( "$listdata(", ",", ")" ) );
registerFunction( "$listfind", new VarArgsSQLFunction( "$listfind(", ",", ")" ) );
registerFunction( "$listget", new VarArgsSQLFunction( "$listget(", ",", ")" ) );
registerFunction( "$listlength", new StandardSQLFunction( "$listlength", Hibernate.INTEGER ) );
registerFunction( "locate", new StandardSQLFunction( "$FIND", Hibernate.INTEGER ) );
registerFunction( "log", new StandardJDBCEscapeFunction( "log", Hibernate.DOUBLE ) );
registerFunction( "log10", new StandardJDBCEscapeFunction( "log", Hibernate.DOUBLE ) );
registerFunction( "lower", new StandardSQLFunction( "lower" ) );
registerFunction( "ltrim", new StandardSQLFunction( "ltrim" ) );
registerFunction( "minute", new StandardJDBCEscapeFunction( "minute", Hibernate.INTEGER ) );
registerFunction( "mod", new StandardJDBCEscapeFunction( "mod", Hibernate.DOUBLE ) );
registerFunction( "month", new StandardJDBCEscapeFunction( "month", Hibernate.INTEGER ) );
registerFunction( "monthname", new StandardJDBCEscapeFunction( "monthname", Hibernate.STRING ) );
registerFunction( "now", new StandardJDBCEscapeFunction( "monthname", Hibernate.TIMESTAMP ) );
registerFunction( "nullif", new VarArgsSQLFunction( "nullif(", ",", ")" ) );
registerFunction( "nvl", new NvlFunction() );
registerFunction( "%odbcin", new StandardSQLFunction( "%odbcin" ) );
registerFunction( "%odbcout", new StandardSQLFunction( "%odbcin" ) );
registerFunction( "%pattern", new VarArgsSQLFunction( Hibernate.STRING, "", "%pattern", "" ) );
registerFunction( "pi", new StandardJDBCEscapeFunction( "pi", Hibernate.DOUBLE ) );
registerFunction( "$piece", new VarArgsSQLFunction( Hibernate.STRING, "$piece(", ",", ")" ) );
registerFunction( "position", new VarArgsSQLFunction( Hibernate.INTEGER, "position(", " in ", ")" ) );
registerFunction( "power", new VarArgsSQLFunction( Hibernate.STRING, "power(", ",", ")" ) );
registerFunction( "quarter", new StandardJDBCEscapeFunction( "quarter", Hibernate.INTEGER ) );
registerFunction( "repeat", new VarArgsSQLFunction( Hibernate.STRING, "repeat(", ",", ")" ) );
registerFunction( "replicate", new VarArgsSQLFunction( Hibernate.STRING, "replicate(", ",", ")" ) );
registerFunction( "right", new StandardJDBCEscapeFunction( "right", Hibernate.STRING ) );
registerFunction( "round", new VarArgsSQLFunction( Hibernate.FLOAT, "round(", ",", ")" ) );
registerFunction( "rtrim", new StandardSQLFunction( "rtrim", Hibernate.STRING ) );
registerFunction( "second", new StandardJDBCEscapeFunction( "second", Hibernate.INTEGER ) );
registerFunction( "sign", new StandardSQLFunction( "sign", Hibernate.INTEGER ) );
registerFunction( "sin", new StandardJDBCEscapeFunction( "sin", Hibernate.DOUBLE ) );
registerFunction( "space", new StandardSQLFunction( "space", Hibernate.STRING ) );
registerFunction( "%sqlstring", new VarArgsSQLFunction( Hibernate.STRING, "%sqlstring(", ",", ")" ) );
registerFunction( "%sqlupper", new VarArgsSQLFunction( Hibernate.STRING, "%sqlupper(", ",", ")" ) );
registerFunction( "sqrt", new StandardJDBCEscapeFunction( "SQRT", Hibernate.DOUBLE ) );
registerFunction( "%startswith", new VarArgsSQLFunction( Hibernate.STRING, "", "%startswith", "" ) );
// below is for Cache' that don't have str in 2007.1 there is str and we register str directly
registerFunction( "str", new SQLFunctionTemplate( Hibernate.STRING, "cast(?1 as char varying)" ) );
registerFunction( "string", new VarArgsSQLFunction( Hibernate.STRING, "string(", ",", ")" ) );
// note that %string is deprecated
registerFunction( "%string", new VarArgsSQLFunction( Hibernate.STRING, "%string(", ",", ")" ) );
registerFunction( "substr", new VarArgsSQLFunction( Hibernate.STRING, "substr(", ",", ")" ) );
registerFunction( "substring", new VarArgsSQLFunction( Hibernate.STRING, "substring(", ",", ")" ) );
registerFunction( "sysdate", new NoArgSQLFunction( "sysdate", Hibernate.TIMESTAMP, false ) );
registerFunction( "tan", new StandardJDBCEscapeFunction( "tan", Hibernate.DOUBLE ) );
registerFunction( "timestampadd", new StandardJDBCEscapeFunction( "timestampadd", Hibernate.DOUBLE ) );
registerFunction( "timestampdiff", new StandardJDBCEscapeFunction( "timestampdiff", Hibernate.DOUBLE ) );
registerFunction( "tochar", new VarArgsSQLFunction( Hibernate.STRING, "tochar(", ",", ")" ) );
registerFunction( "to_char", new VarArgsSQLFunction( Hibernate.STRING, "to_char(", ",", ")" ) );