Package org.hibernate.dialect.function

Examples of org.hibernate.dialect.function.NoArgSQLFunction


    registerFunction( "ltrim", new StandardSQLFunction("ltrim") );
    registerFunction( "rtrim", new StandardSQLFunction("rtrim") );
    registerFunction( "reverse", new StandardSQLFunction("reverse") );
    registerFunction( "space", new StandardSQLFunction("space", Hibernate.STRING) );

    registerFunction( "user", new NoArgSQLFunction("user", Hibernate.STRING) );

    registerFunction( "current_timestamp", new NoArgSQLFunction("getdate", Hibernate.TIMESTAMP) );
    registerFunction( "current_time", new NoArgSQLFunction("getdate", Hibernate.TIME) );
    registerFunction( "current_date", new NoArgSQLFunction("getdate", Hibernate.DATE) );

    registerFunction( "getdate", new NoArgSQLFunction("getdate", Hibernate.TIMESTAMP) );
    registerFunction( "getutcdate", new NoArgSQLFunction("getutcdate", Hibernate.TIMESTAMP) );
    registerFunction( "day", new StandardSQLFunction("day", Hibernate.INTEGER) );
    registerFunction( "month", new StandardSQLFunction("month", Hibernate.INTEGER) );
    registerFunction( "year", new StandardSQLFunction("year", Hibernate.INTEGER) );
    registerFunction( "datename", new StandardSQLFunction("datename", Hibernate.STRING) );

    registerFunction( "abs", new StandardSQLFunction("abs") );
    registerFunction( "sign", new StandardSQLFunction("sign", Hibernate.INTEGER) );

    registerFunction( "acos", new StandardSQLFunction("acos", Hibernate.DOUBLE) );
    registerFunction( "asin", new StandardSQLFunction("asin", Hibernate.DOUBLE) );
    registerFunction( "atan", new StandardSQLFunction("atan", Hibernate.DOUBLE) );
    registerFunction( "cos", new StandardSQLFunction("cos", Hibernate.DOUBLE) );
    registerFunction( "cot", new StandardSQLFunction("cot", Hibernate.DOUBLE) );
    registerFunction( "exp", new StandardSQLFunction("exp", Hibernate.DOUBLE) );
    registerFunction( "log", new StandardSQLFunction( "log", Hibernate.DOUBLE) );
    registerFunction( "log10", new StandardSQLFunction("log10", Hibernate.DOUBLE) );
    registerFunction( "sin", new StandardSQLFunction("sin", Hibernate.DOUBLE) );
    registerFunction( "sqrt", new StandardSQLFunction("sqrt", Hibernate.DOUBLE) );
    registerFunction( "tan", new StandardSQLFunction("tan", Hibernate.DOUBLE) );
    registerFunction( "pi", new NoArgSQLFunction("pi", Hibernate.DOUBLE) );
    registerFunction( "square", new StandardSQLFunction("square") );
    registerFunction( "rand", new StandardSQLFunction("rand", Hibernate.FLOAT) );

    registerFunction("radians", new StandardSQLFunction("radians", Hibernate.DOUBLE) );
    registerFunction("degrees", new StandardSQLFunction("degrees", Hibernate.DOUBLE) );
View Full Code Here


    registerFunction("cot", new StandardSQLFunction("cot", Hibernate.DOUBLE) );
    registerFunction("exp", new StandardSQLFunction("exp", Hibernate.DOUBLE) );
    registerFunction("ln", new StandardSQLFunction("ln", Hibernate.DOUBLE) );
    registerFunction("log", new StandardSQLFunction("log", Hibernate.DOUBLE) );
    registerFunction("log10", new StandardSQLFunction("log10", Hibernate.DOUBLE) );
    registerFunction("pi", new NoArgSQLFunction("pi", Hibernate.DOUBLE) );
    registerFunction("rand", new NoArgSQLFunction("rand", Hibernate.DOUBLE) );
    registerFunction("sin", new StandardSQLFunction("sin", Hibernate.DOUBLE) );
    registerFunction("sinh", new StandardSQLFunction("sinh", Hibernate.DOUBLE) );
    registerFunction("sqrt", new StandardSQLFunction("sqrt", Hibernate.DOUBLE) );
    registerFunction("tan", new StandardSQLFunction("tan", Hibernate.DOUBLE) );
    registerFunction("tanh", new StandardSQLFunction("tanh", Hibernate.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", Hibernate.CHARACTER) );
    registerFunction( "initcap", new StandardSQLFunction("initcap") );

    registerFunction( "user", new NoArgSQLFunction("user", Hibernate.STRING, false) );

    registerFunction( "current_date", new NoArgSQLFunction("current_date", Hibernate.DATE, false) );
    registerFunction( "current_time", new NoArgSQLFunction("current_timestamp", Hibernate.TIME, false) );
    registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP, false) );
    registerFunction("curdate", new NoArgSQLFunction("curdate",Hibernate.DATE) );
    registerFunction("curtime", new NoArgSQLFunction("curtime",Hibernate.TIME) );
    registerFunction("days", new StandardSQLFunction("days",Hibernate.INTEGER) );
    registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth",Hibernate.INTEGER) );
    registerFunction("dayname", new StandardSQLFunction("dayname",Hibernate.STRING) );
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek",Hibernate.INTEGER) );
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear",Hibernate.INTEGER) );
    registerFunction("hour", new StandardSQLFunction("hour",Hibernate.INTEGER) );
    registerFunction("last_day", new StandardSQLFunction("last_day",Hibernate.DATE) );
    registerFunction("microsecond", new StandardSQLFunction("microsecond",Hibernate.INTEGER) );
    registerFunction("minute", new StandardSQLFunction("minute",Hibernate.INTEGER) );
    registerFunction("month", new StandardSQLFunction("month",Hibernate.INTEGER) );
    registerFunction("monthname", new StandardSQLFunction("monthname",Hibernate.STRING) );
    registerFunction("now", new NoArgSQLFunction("now",Hibernate.TIMESTAMP) );
    registerFunction("quarter", new StandardSQLFunction("quarter",Hibernate.INTEGER) );
    registerFunction("second", new StandardSQLFunction("second",Hibernate.INTEGER) );
    registerFunction("time", new StandardSQLFunction("time",Hibernate.TIME) );
    registerFunction("timestamp", new StandardSQLFunction("timestamp",Hibernate.TIMESTAMP) );
    registerFunction("week", new StandardSQLFunction("week",Hibernate.INTEGER) );
View Full Code Here

    registerFunction("hex", new StandardSQLFunction("hex", Hibernate.STRING) );
    registerFunction("ln", new StandardSQLFunction("ln", Hibernate.DOUBLE) );
    registerFunction("log", new StandardSQLFunction("log", Hibernate.DOUBLE) );
    registerFunction("log10", new StandardSQLFunction("log10", Hibernate.DOUBLE) );
    registerFunction("radians", new StandardSQLFunction("radians", Hibernate.DOUBLE) );
    registerFunction("rand", new NoArgSQLFunction("rand", Hibernate.DOUBLE) );
    registerFunction("sin", new StandardSQLFunction("sin", Hibernate.DOUBLE) );
    registerFunction("soundex", new StandardSQLFunction("soundex", Hibernate.STRING) );
    registerFunction("sqrt", new StandardSQLFunction("sqrt", Hibernate.DOUBLE) );
    registerFunction("stddev", new StandardSQLFunction("stddev", Hibernate.DOUBLE) );
    registerFunction("tan", new StandardSQLFunction("tan", Hibernate.DOUBLE) );
    registerFunction("variance", new StandardSQLFunction("variance", Hibernate.DOUBLE) );

    registerFunction("julian_day", new StandardSQLFunction("julian_day", Hibernate.INTEGER) );
    registerFunction("microsecond", new StandardSQLFunction("microsecond", Hibernate.INTEGER) );
    registerFunction("midnight_seconds", new StandardSQLFunction("midnight_seconds", Hibernate.INTEGER) );
    registerFunction("minute", new StandardSQLFunction("minute", Hibernate.INTEGER) );
    registerFunction("month", new StandardSQLFunction("month", Hibernate.INTEGER) );
    registerFunction("monthname", new StandardSQLFunction("monthname", Hibernate.STRING) );
    registerFunction("quarter", new StandardSQLFunction("quarter", Hibernate.INTEGER) );
    registerFunction("hour", new StandardSQLFunction("hour", Hibernate.INTEGER) );
    registerFunction("second", new StandardSQLFunction("second", Hibernate.INTEGER) );
    registerFunction("current_date", new NoArgSQLFunction("current date", Hibernate.DATE, false) );
    registerFunction("date", new StandardSQLFunction("date", Hibernate.DATE) );
    registerFunction("day", new StandardSQLFunction("day", Hibernate.INTEGER) );
    registerFunction("dayname", new StandardSQLFunction("dayname", Hibernate.STRING) );
    registerFunction("dayofweek", new StandardSQLFunction("dayofweek", Hibernate.INTEGER) );
    registerFunction("dayofweek_iso", new StandardSQLFunction("dayofweek_iso", Hibernate.INTEGER) );
    registerFunction("dayofyear", new StandardSQLFunction("dayofyear", Hibernate.INTEGER) );
    registerFunction("days", new StandardSQLFunction("days", Hibernate.LONG) );
    registerFunction("current_time", new NoArgSQLFunction("current time", Hibernate.TIME, false) );
    registerFunction("time", new StandardSQLFunction("time", Hibernate.TIME) );
    registerFunction("current_timestamp", new NoArgSQLFunction("current timestamp", Hibernate.TIMESTAMP, false) );
    registerFunction("timestamp", new StandardSQLFunction("timestamp", Hibernate.TIMESTAMP) );
    registerFunction("timestamp_iso", new StandardSQLFunction("timestamp_iso", Hibernate.TIMESTAMP) );
    registerFunction("week", new StandardSQLFunction("week", Hibernate.INTEGER) );
    registerFunction("week_iso", new StandardSQLFunction("week_iso", Hibernate.INTEGER) );
    registerFunction("year", new StandardSQLFunction("year", Hibernate.INTEGER) );
View Full Code Here

    registerFunction( "length", new StandardSQLFunction("length", Hibernate.LONG) );

    registerFunction( "to_char", new StandardSQLFunction("to_char", Hibernate.STRING) );
    registerFunction( "to_date", new StandardSQLFunction("to_date", Hibernate.TIMESTAMP) );

    registerFunction( "current_date", new NoArgSQLFunction("current_date", Hibernate.DATE, false) );
    registerFunction( "current_time", new NoArgSQLFunction("current_timestamp", Hibernate.TIME, false) );
    registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP, false) );
   
    registerFunction( "last_day", new StandardSQLFunction("last_day", Hibernate.DATE) );
    registerFunction( "sysdate", new NoArgSQLFunction("sysdate", Hibernate.DATE, false) );
    registerFunction( "systimestamp", new NoArgSQLFunction("systimestamp", Hibernate.TIMESTAMP, false) );
    registerFunction( "uid", new NoArgSQLFunction("uid", Hibernate.INTEGER, false) );
    registerFunction( "user", new NoArgSQLFunction("user", Hibernate.STRING, false) );

    registerFunction( "rowid", new NoArgSQLFunction("rowid", Hibernate.LONG, false) );
    registerFunction( "rownum", new NoArgSQLFunction("rownum", Hibernate.LONG, false) );

    // Multi-param string dialect functions...
    registerFunction( "concat", new VarArgsSQLFunction(Hibernate.STRING, "", "||", "") );
    registerFunction( "instr", new StandardSQLFunction("instr", Hibernate.INTEGER) );
    registerFunction( "instrb", new StandardSQLFunction("instrb", Hibernate.INTEGER) );
View Full Code Here

    registerFunction( "degrees", new StandardSQLFunction("degrees", Hibernate.DOUBLE) );

    registerFunction( "stddev", new StandardSQLFunction("stddev", Hibernate.DOUBLE) );
    registerFunction( "variance", new StandardSQLFunction("variance", Hibernate.DOUBLE) );

    registerFunction( "random", new NoArgSQLFunction("random", Hibernate.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", Hibernate.CHARACTER) );
    registerFunction( "lower", new StandardSQLFunction("lower") );
    registerFunction( "upper", new StandardSQLFunction("upper") );
    registerFunction( "substr", new StandardSQLFunction("substr", Hibernate.STRING) );
    registerFunction( "initcap", new StandardSQLFunction("initcap") );
    registerFunction( "to_ascii", new StandardSQLFunction("to_ascii") );
    registerFunction( "quote_ident", new StandardSQLFunction("quote_ident", Hibernate.STRING) );
    registerFunction( "quote_literal", new StandardSQLFunction("quote_literal", Hibernate.STRING) );
    registerFunction( "md5", new StandardSQLFunction("md5") );
    registerFunction( "ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER) );
    registerFunction( "length", new StandardSQLFunction("length", Hibernate.LONG) );
    registerFunction( "char_length", new StandardSQLFunction("char_length", Hibernate.LONG) );
    registerFunction( "bit_length", new StandardSQLFunction("bit_length", Hibernate.LONG) );
    registerFunction( "octet_length", new StandardSQLFunction("octet_length", Hibernate.LONG) );

    registerFunction( "age", new StandardSQLFunction("age") );
    registerFunction( "current_date", new NoArgSQLFunction("current_date", Hibernate.DATE, false) );
    registerFunction( "current_time", new NoArgSQLFunction("current_time", Hibernate.TIME, false) );
    registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP, false) );
    registerFunction( "date_trunc", new StandardSQLFunction( "date_trunc", Hibernate.TIMESTAMP ) );
    registerFunction( "localtime", new NoArgSQLFunction("localtime", Hibernate.TIME, false) );
    registerFunction( "localtimestamp", new NoArgSQLFunction("localtimestamp", Hibernate.TIMESTAMP, false) );
    registerFunction( "now", new NoArgSQLFunction("now", Hibernate.TIMESTAMP) );
    registerFunction( "timeofday", new NoArgSQLFunction("timeofday", Hibernate.STRING) );

    registerFunction( "current_user", new NoArgSQLFunction("current_user", Hibernate.STRING, false) );
    registerFunction( "session_user", new NoArgSQLFunction("session_user", Hibernate.STRING, false) );
    registerFunction( "user", new NoArgSQLFunction("user", Hibernate.STRING, false) );
    registerFunction( "current_database", new NoArgSQLFunction("current_database", Hibernate.STRING, true) );
    registerFunction( "current_schema", new NoArgSQLFunction("current_schema", Hibernate.STRING, true) );
   
    registerFunction( "to_char", new StandardSQLFunction("to_char", Hibernate.STRING) );
    registerFunction( "to_date", new StandardSQLFunction("to_date", Hibernate.DATE) );
    registerFunction( "to_timestamp", new StandardSQLFunction("to_timestamp", Hibernate.TIMESTAMP) );
    registerFunction( "to_number", new StandardSQLFunction("to_number", Hibernate.BIG_DECIMAL) );
View Full Code Here

    registerFunction( "exp", new StandardSQLFunction( "exp", StandardBasicTypes.DOUBLE ) );
    registerFunction( "ln", new StandardSQLFunction( "ln", StandardBasicTypes.DOUBLE ) );
    registerFunction( "log", new StandardSQLFunction( "log", StandardBasicTypes.DOUBLE ) );
    registerFunction( "log2", new StandardSQLFunction( "log2", 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( "sqrt", new StandardSQLFunction( "sqrt", StandardBasicTypes.DOUBLE ) );
    registerFunction( "stddev", new StandardSQLFunction("std", StandardBasicTypes.DOUBLE) );
    registerFunction( "tan", new StandardSQLFunction( "tan", StandardBasicTypes.DOUBLE ) );

    registerFunction( "radians", new StandardSQLFunction( "radians", StandardBasicTypes.DOUBLE ) );
    registerFunction( "degrees", new StandardSQLFunction( "degrees", StandardBasicTypes.DOUBLE ) );

    registerFunction( "ceiling", new StandardSQLFunction( "ceiling", StandardBasicTypes.INTEGER ) );
    registerFunction( "ceil", new StandardSQLFunction( "ceil", StandardBasicTypes.INTEGER ) );
    registerFunction( "floor", new StandardSQLFunction( "floor", StandardBasicTypes.INTEGER ) );
    registerFunction( "round", new StandardSQLFunction( "round" ) );

    registerFunction( "datediff", new StandardSQLFunction( "datediff", StandardBasicTypes.INTEGER ) );
    registerFunction( "timediff", new StandardSQLFunction( "timediff", StandardBasicTypes.TIME ) );
    registerFunction( "date_format", new StandardSQLFunction( "date_format", StandardBasicTypes.STRING ) );

    registerFunction( "curdate", new NoArgSQLFunction( "curdate", StandardBasicTypes.DATE ) );
    registerFunction( "curtime", new NoArgSQLFunction( "curtime", StandardBasicTypes.TIME ) );
    registerFunction( "current_date", new NoArgSQLFunction( "current_date", StandardBasicTypes.DATE, false ) );
    registerFunction( "current_time", new NoArgSQLFunction( "current_time", StandardBasicTypes.TIME, false ) );
    registerFunction( "current_timestamp", new NoArgSQLFunction( "current_timestamp", StandardBasicTypes.TIMESTAMP, false ) );
    registerFunction( "date", new StandardSQLFunction( "date", StandardBasicTypes.DATE ) );
    registerFunction( "day", new StandardSQLFunction( "day", 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( "from_days", new StandardSQLFunction( "from_days", StandardBasicTypes.DATE ) );
    registerFunction( "from_unixtime", new StandardSQLFunction( "from_unixtime", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "hour", new StandardSQLFunction( "hour", StandardBasicTypes.INTEGER ) );
    registerFunction( "last_day", new StandardSQLFunction( "last_day", StandardBasicTypes.DATE ) );
    registerFunction( "localtime", new NoArgSQLFunction( "localtime", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "localtimestamp", new NoArgSQLFunction( "localtimestamp", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "microseconds", new StandardSQLFunction( "microseconds", 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 ) );
    registerFunction( "quarter", new StandardSQLFunction( "quarter", StandardBasicTypes.INTEGER ) );
    registerFunction( "second", new StandardSQLFunction( "second", StandardBasicTypes.INTEGER ) );
    registerFunction( "sec_to_time", new StandardSQLFunction( "sec_to_time", StandardBasicTypes.TIME ) );
    registerFunction( "sysdate", new NoArgSQLFunction( "sysdate", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "time", new StandardSQLFunction( "time", StandardBasicTypes.TIME ) );
    registerFunction( "timestamp", new StandardSQLFunction( "timestamp", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "time_to_sec", new StandardSQLFunction( "time_to_sec", StandardBasicTypes.INTEGER ) );
    registerFunction( "to_days", new StandardSQLFunction( "to_days", StandardBasicTypes.LONG ) );
    registerFunction( "unix_timestamp", new StandardSQLFunction( "unix_timestamp", StandardBasicTypes.LONG ) );
    registerFunction( "utc_date", new NoArgSQLFunction( "utc_date", StandardBasicTypes.STRING ) );
    registerFunction( "utc_time", new NoArgSQLFunction( "utc_time", StandardBasicTypes.STRING ) );
    registerFunction( "utc_timestamp", new NoArgSQLFunction( "utc_timestamp", StandardBasicTypes.STRING ) );
    registerFunction( "week", new StandardSQLFunction( "week", StandardBasicTypes.INTEGER ) );
    registerFunction( "weekday", new StandardSQLFunction( "weekday", StandardBasicTypes.INTEGER ) );
    registerFunction( "weekofyear", new StandardSQLFunction( "weekofyear", StandardBasicTypes.INTEGER ) );
    registerFunction( "year", new StandardSQLFunction( "year", StandardBasicTypes.INTEGER ) );
    registerFunction( "yearweek", new StandardSQLFunction( "yearweek", StandardBasicTypes.INTEGER ) );
View Full Code Here

    registerFunction( "degrees", new StandardSQLFunction("degrees", StandardBasicTypes.DOUBLE) );

    registerFunction( "stddev", new StandardSQLFunction("stddev", StandardBasicTypes.DOUBLE) );
    registerFunction( "variance", new StandardSQLFunction("variance", StandardBasicTypes.DOUBLE) );

    registerFunction( "random", new NoArgSQLFunction("random", StandardBasicTypes.DOUBLE) );
    registerFunction( "rand", new NoArgSQLFunction("random", 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( "lower", new StandardSQLFunction("lower") );
    registerFunction( "upper", new StandardSQLFunction("upper") );
    registerFunction( "substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING) );
    registerFunction( "initcap", new StandardSQLFunction("initcap") );
    registerFunction( "to_ascii", new StandardSQLFunction("to_ascii") );
    registerFunction( "quote_ident", new StandardSQLFunction("quote_ident", StandardBasicTypes.STRING) );
    registerFunction( "quote_literal", new StandardSQLFunction("quote_literal", StandardBasicTypes.STRING) );
    registerFunction( "md5", new StandardSQLFunction("md5", StandardBasicTypes.STRING) );
    registerFunction( "ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER) );
    registerFunction( "char_length", new StandardSQLFunction("char_length", StandardBasicTypes.LONG) );
    registerFunction( "bit_length", new StandardSQLFunction("bit_length", StandardBasicTypes.LONG) );
    registerFunction( "octet_length", new StandardSQLFunction("octet_length", StandardBasicTypes.LONG) );

    registerFunction( "age", new StandardSQLFunction("age") );
    registerFunction( "current_date", new NoArgSQLFunction("current_date", StandardBasicTypes.DATE, false) );
    registerFunction( "current_time", new NoArgSQLFunction("current_time", StandardBasicTypes.TIME, false) );
    registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIMESTAMP, false) );
    registerFunction( "date_trunc", new StandardSQLFunction( "date_trunc", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "localtime", new NoArgSQLFunction("localtime", StandardBasicTypes.TIME, false) );
    registerFunction( "localtimestamp", new NoArgSQLFunction("localtimestamp", StandardBasicTypes.TIMESTAMP, false) );
    registerFunction( "now", new NoArgSQLFunction("now", StandardBasicTypes.TIMESTAMP) );
    registerFunction( "timeofday", new NoArgSQLFunction("timeofday", StandardBasicTypes.STRING) );

    registerFunction( "current_user", new NoArgSQLFunction("current_user", StandardBasicTypes.STRING, false) );
    registerFunction( "session_user", new NoArgSQLFunction("session_user", StandardBasicTypes.STRING, false) );
    registerFunction( "user", new NoArgSQLFunction("user", StandardBasicTypes.STRING, false) );
    registerFunction( "current_database", new NoArgSQLFunction("current_database", StandardBasicTypes.STRING, true) );
    registerFunction( "current_schema", new NoArgSQLFunction("current_schema", StandardBasicTypes.STRING, true) );
   
    registerFunction( "to_char", new StandardSQLFunction("to_char", StandardBasicTypes.STRING) );
    registerFunction( "to_date", new StandardSQLFunction("to_date", StandardBasicTypes.DATE) );
    registerFunction( "to_timestamp", new StandardSQLFunction("to_timestamp", StandardBasicTypes.TIMESTAMP) );
    registerFunction( "to_number", new StandardSQLFunction("to_number", StandardBasicTypes.BIG_DECIMAL) );
View Full Code Here

  /**
   * Register functions current_time, current_timestamp, current_date
   */
  protected void registerDateTimeFunctions() {
    registerFunction( "current_time", new NoArgSQLFunction( "current_time", StandardBasicTypes.TIME, false ) );
    registerFunction(
        "current_timestamp", new NoArgSQLFunction(
        "current_timestamp",
        StandardBasicTypes.TIMESTAMP,
        false
    )
    );
    registerFunction( "current_date", new NoArgSQLFunction( "current_date", StandardBasicTypes.DATE, false ) );
  }
View Full Code Here

    super();

    registerFunction( "ltrim", new StandardSQLFunction( "ltrim" ) );
    registerFunction( "rtrim", new StandardSQLFunction( "rtrim" ) );
    registerFunction( "soundex", new StandardSQLFunction( "soundex" ) );
    registerFunction( "sysdate", new NoArgSQLFunction( "sysdate", StandardBasicTypes.DATE, false ) );
    registerFunction( "rowid", new NoArgSQLFunction( "rowid", StandardBasicTypes.LONG, false ) );
    registerFunction( "rownum", new NoArgSQLFunction( "rownum", StandardBasicTypes.LONG, false ) );
    registerFunction( "instr", new StandardSQLFunction( "instr", StandardBasicTypes.INTEGER ) );
    registerFunction( "lpad", new StandardSQLFunction( "lpad", StandardBasicTypes.STRING ) );
    registerFunction( "replace", new StandardSQLFunction( "replace", StandardBasicTypes.STRING ) );
    registerFunction( "rpad", new StandardSQLFunction( "rpad", StandardBasicTypes.STRING ) );
    registerFunction( "translate", new StandardSQLFunction( "translate", StandardBasicTypes.STRING ) );
View Full Code Here

    registerFunction( "bit_xor", new StandardSQLFunction( "bit_xor" ) );
    registerFunction( "character_length", new StandardSQLFunction( "character_length", StandardBasicTypes.LONG ) );
    registerFunction( "charextract", new StandardSQLFunction( "charextract", StandardBasicTypes.STRING ) );
    registerFunction( "concat", new VarArgsSQLFunction( StandardBasicTypes.STRING, "(", "+", ")" ) );
    registerFunction( "cos", new StandardSQLFunction( "cos", StandardBasicTypes.DOUBLE ) );
    registerFunction( "current_user", new NoArgSQLFunction( "current_user", StandardBasicTypes.STRING, false ) );
    registerFunction( "current_time", new NoArgSQLFunction( "date('now')", StandardBasicTypes.TIMESTAMP, false ) );
    registerFunction( "current_timestamp", new NoArgSQLFunction( "date('now')", StandardBasicTypes.TIMESTAMP, false ) );
    registerFunction( "current_date", new NoArgSQLFunction( "date('now')", StandardBasicTypes.TIMESTAMP, false ) );
    registerFunction( "date_trunc", new StandardSQLFunction( "date_trunc", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "day", new StandardSQLFunction( "day", StandardBasicTypes.INTEGER ) );
    registerFunction( "dba", new NoArgSQLFunction( "dba", StandardBasicTypes.STRING, true ) );
    registerFunction( "dow", new StandardSQLFunction( "dow", StandardBasicTypes.STRING ) );
    registerFunction( "extract", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "date_part('?1', ?3)" ) );
    registerFunction( "exp", new StandardSQLFunction( "exp", StandardBasicTypes.DOUBLE ) );
    registerFunction( "gmt_timestamp", new StandardSQLFunction( "gmt_timestamp", StandardBasicTypes.STRING ) );
    registerFunction( "hash", new StandardSQLFunction( "hash", StandardBasicTypes.INTEGER ) );
    registerFunction( "hex", new StandardSQLFunction( "hex", StandardBasicTypes.STRING ) );
    registerFunction( "hour", new StandardSQLFunction( "hour", StandardBasicTypes.INTEGER ) );
    registerFunction( "initial_user", new NoArgSQLFunction( "initial_user", StandardBasicTypes.STRING, false ) );
    registerFunction( "intextract", new StandardSQLFunction( "intextract", StandardBasicTypes.INTEGER ) );
    registerFunction( "left", new StandardSQLFunction( "left", StandardBasicTypes.STRING ) );
    registerFunction( "locate", new SQLFunctionTemplate( StandardBasicTypes.LONG, "locate(?1, ?2)" ) );
    registerFunction( "length", new StandardSQLFunction( "length", StandardBasicTypes.LONG ) );
    registerFunction( "ln", new StandardSQLFunction( "ln", StandardBasicTypes.DOUBLE ) );
    registerFunction( "log", new StandardSQLFunction( "log", StandardBasicTypes.DOUBLE ) );
    registerFunction( "lower", new StandardSQLFunction( "lower" ) );
    registerFunction( "lowercase", new StandardSQLFunction( "lowercase" ) );
    registerFunction( "minute", new StandardSQLFunction( "minute", StandardBasicTypes.INTEGER ) );
    registerFunction( "month", new StandardSQLFunction( "month", StandardBasicTypes.INTEGER ) );
    registerFunction( "octet_length", new StandardSQLFunction( "octet_length", StandardBasicTypes.LONG ) );
    registerFunction( "pad", new StandardSQLFunction( "pad", StandardBasicTypes.STRING ) );
    registerFunction( "position", new StandardSQLFunction( "position", StandardBasicTypes.LONG ) );
    registerFunction( "power", new StandardSQLFunction( "power", StandardBasicTypes.DOUBLE ) );
    registerFunction( "random", new NoArgSQLFunction( "random", StandardBasicTypes.LONG, true ) );
    registerFunction( "randomf", new NoArgSQLFunction( "randomf", StandardBasicTypes.DOUBLE, true ) );
    registerFunction( "right", new StandardSQLFunction( "right", StandardBasicTypes.STRING ) );
    registerFunction( "session_user", new NoArgSQLFunction( "session_user", StandardBasicTypes.STRING, false ) );
    registerFunction( "second", new StandardSQLFunction( "second", StandardBasicTypes.INTEGER ) );
    registerFunction( "size", new NoArgSQLFunction( "size", StandardBasicTypes.LONG, true ) );
    registerFunction( "squeeze", new StandardSQLFunction( "squeeze" ) );
    registerFunction( "sin", new StandardSQLFunction( "sin", StandardBasicTypes.DOUBLE ) );
    registerFunction( "soundex", new StandardSQLFunction( "soundex", StandardBasicTypes.STRING ) );
    registerFunction( "sqrt", new StandardSQLFunction( "sqrt", StandardBasicTypes.DOUBLE ) );
    registerFunction( "substring", new SQLFunctionTemplate( StandardBasicTypes.STRING, "substring(?1 FROM ?2 FOR ?3)" ) );
    registerFunction( "system_user", new NoArgSQLFunction( "system_user", StandardBasicTypes.STRING, false ) );
    //registerFunction( "trim", new StandardSQLFunction( "trim", StandardBasicTypes.STRING ) );
    registerFunction( "unhex", new StandardSQLFunction( "unhex", StandardBasicTypes.STRING ) );
    registerFunction( "upper", new StandardSQLFunction( "upper" ) );
    registerFunction( "uppercase", new StandardSQLFunction( "uppercase" ) );
    registerFunction( "user", new NoArgSQLFunction( "user", StandardBasicTypes.STRING, false ) );
    registerFunction( "usercode", new NoArgSQLFunction( "usercode", StandardBasicTypes.STRING, true ) );
    registerFunction( "username", new NoArgSQLFunction( "username", StandardBasicTypes.STRING, true ) );
    registerFunction( "uuid_create", new StandardSQLFunction( "uuid_create", StandardBasicTypes.BYTE ) );
    registerFunction( "uuid_compare", new StandardSQLFunction( "uuid_compare", StandardBasicTypes.INTEGER ) );
    registerFunction( "uuid_from_char", new StandardSQLFunction( "uuid_from_char", StandardBasicTypes.BYTE ) );
    registerFunction( "uuid_to_char", new StandardSQLFunction( "uuid_to_char", StandardBasicTypes.STRING ) );
    registerFunction( "year", new StandardSQLFunction( "year", StandardBasicTypes.INTEGER ) );
View Full Code Here

TOP

Related Classes of org.hibernate.dialect.function.NoArgSQLFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.