Package org.hibernate.dialect.function

Examples of org.hibernate.dialect.function.VarArgsSQLFunction


    registerFunction( "substring", new StandardSQLFunction( "substr", Hibernate.STRING ) );
    registerFunction( "bit_length", new SQLFunctionTemplate( Hibernate.INTEGER, "length(?1)*8" ) );
    registerFunction( "trim", new AnsiTrimEmulationFunction() );

    registerFunction( "concat", new VarArgsSQLFunction(Hibernate.STRING, "", "||", "") );

    registerFunction( "str", new SQLFunctionTemplate( Hibernate.STRING, "rtrim(char(?1))" ) );

    registerKeyword("current");
    registerKeyword("date");
View Full Code Here


    registerColumnType( Types.BLOB, "BLOB" );
    registerColumnType( Types.CLOB, "CLOB" );

    registerFunction( "year", new SQLFunctionTemplate( Hibernate.INTEGER, "extract(year from ?1)" ) );
    registerFunction( "length", new SQLFunctionTemplate( Hibernate.INTEGER, "character_length(?1)" ) );
    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(", "||", ")" ) );
    registerFunction( "substring", new SQLFunctionTemplate( Hibernate.STRING, "substring(?1 from ?2 for ?3)" ) );
    registerFunction( "locate", new SQLFunctionTemplate( Hibernate.STRING, "position(?1 in ?2)" ) );
    registerFunction( "mod", new SQLFunctionTemplate( Hibernate.STRING, "?1 mod ?2" ) );
    registerFunction( "str", new SQLFunctionTemplate( Hibernate.STRING, "cast(?1 as varchar(255))" ) );
View Full Code Here

    registerFunction( "ceiling", new StandardSQLFunction("ceiling") );
    registerFunction( "floor", new StandardSQLFunction("floor") );

    registerFunction( "isnull", new StandardSQLFunction("isnull") );

    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(","+",")" ) );

    registerFunction( "length", new StandardSQLFunction( "len", Hibernate.INTEGER ) );
    registerFunction( "trim", new SQLFunctionTemplate( Hibernate.STRING, "ltrim(rtrim(?1))") );
    registerFunction( "locate", new CharIndexFunction() );
View Full Code Here

    registerColumnType( Types.VARBINARY, "blob" );
    registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
    registerColumnType( Types.BLOB, "blob" );
    registerColumnType( Types.CLOB, "blob sub_type 1" );
   
    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(","||",")" ) );

    getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
  }
View Full Code Here

        registerFunction("hash", new StandardSQLFunction("hash", Hibernate.BINARY));

        registerFunction("ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER));
//        registerFunction("bit_length", new StandardSQLFunction("bit_length", Hibernate.INTEGER));
        registerFunction("char", new StandardSQLFunction("char", Hibernate.CHARACTER));
        registerFunction("concat", new VarArgsSQLFunction(Hibernate.STRING, "(", "||", ")"));
        registerFunction("difference", new StandardSQLFunction("difference", Hibernate.INTEGER));
        registerFunction("hextoraw", new StandardSQLFunction("hextoraw", Hibernate.STRING));
        registerFunction("lower", new StandardSQLFunction("lower", Hibernate.STRING));
        registerFunction("insert", new StandardSQLFunction("lower", Hibernate.STRING));
        registerFunction("left", new StandardSQLFunction("left", Hibernate.STRING));
View Full Code Here

    registerFunction( "substring", new StandardSQLFunction( "substr", Hibernate.STRING ) );
    registerFunction( "bit_length", new SQLFunctionTemplate( Hibernate.INTEGER, "length(?1)*8" ) );
    registerFunction( "trim", new AnsiTrimEmulationFunction() );

    registerFunction( "concat", new VarArgsSQLFunction(Hibernate.STRING, "", "||", "") );

    registerFunction( "str", new SQLFunctionTemplate( Hibernate.STRING, "rtrim(char(?1))" ) );

    registerKeyword("current");
    registerKeyword("date");
View Full Code Here

    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) );
    registerFunction( "lpad", new StandardSQLFunction("lpad", Hibernate.STRING) );
    registerFunction( "replace", new StandardSQLFunction("replace", Hibernate.STRING) );
    registerFunction( "rpad", new StandardSQLFunction("rpad", Hibernate.STRING) );
View Full Code Here

    registerColumnType( Types.VARBINARY, "blob" );
    registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
    registerColumnType( Types.BLOB, "blob" );
    registerColumnType( Types.CLOB, "blob sub_type 1" );
   
    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(","||",")" ) );

    getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
  }
View Full Code Here

    registerFunction( "bit_not", new StandardSQLFunction( "bit_not" ) );
    registerFunction( "bit_or", new StandardSQLFunction( "bit_or" ) );
    registerFunction( "bit_xor", new StandardSQLFunction( "bit_xor" ) );
    registerFunction( "character_length", new StandardSQLFunction( "character_length", Hibernate.LONG ) );
    registerFunction( "charextract", new StandardSQLFunction( "charextract", Hibernate.STRING ) );
    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(", "+", ")" ) );
    registerFunction( "cos", new StandardSQLFunction( "cos", Hibernate.DOUBLE ) );
    registerFunction( "current_user", new NoArgSQLFunction( "current_user", Hibernate.STRING, false ) );
    registerFunction( "current_time", new NoArgSQLFunction( "date('now')", Hibernate.TIMESTAMP, false ) );
    registerFunction( "current_timestamp", new NoArgSQLFunction( "date('now')", Hibernate.TIMESTAMP, false ) );
    registerFunction( "current_date", new NoArgSQLFunction( "date('now')", Hibernate.TIMESTAMP, false ) );
View Full Code Here

    registerFunction( "ascii", new StandardSQLFunction("ascii", Hibernate.STRING) );
    registerFunction( "index", new StandardSQLFunction("index", Hibernate.INTEGER) );

    registerFunction( "value", new StandardSQLFunction( "value" ) );
   
    registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(", "||", ")" ) );
    registerFunction( "substring", new StandardSQLFunction( "substr", Hibernate.STRING ) );
    registerFunction( "locate", new StandardSQLFunction("index", Hibernate.INTEGER) );
    registerFunction( "coalesce", new StandardSQLFunction( "value" ) );

    getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
View Full Code Here

TOP

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

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.