Examples of StandardSQLFunction


Examples of org.hibernate.dialect.function.StandardSQLFunction

    registerColumnType( Types.BINARY, "BLOB($1)" );
    registerColumnType( Types.NUMERIC, "NUMERIC(19, $l)" );
    registerColumnType( Types.BLOB, "BLOB($l)" );
    registerColumnType( Types.CLOB, "NCLOB($l)" );

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

    registerFunction( "dacos", new StandardSQLFunction( "dacos", StandardBasicTypes.DOUBLE ) );
    registerFunction( "acos", new StandardSQLFunction( "dacos", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dasin", new StandardSQLFunction( "dasin", StandardBasicTypes.DOUBLE ) );
    registerFunction( "asin", new StandardSQLFunction( "dasin", StandardBasicTypes.DOUBLE ) );
    registerFunction( "datan", new StandardSQLFunction( "datan", StandardBasicTypes.DOUBLE ) );
    registerFunction( "atan", new StandardSQLFunction( "datan", StandardBasicTypes.DOUBLE ) );
    registerFunction( "datan2", new StandardSQLFunction( "datan2", StandardBasicTypes.DOUBLE ) );
    registerFunction( "atan2", new StandardSQLFunction( "datan2", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dcos", new StandardSQLFunction( "dcos", StandardBasicTypes.DOUBLE ) );
    registerFunction( "cos", new StandardSQLFunction( "dcos", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dcot", new StandardSQLFunction( "dcot", StandardBasicTypes.DOUBLE ) );
    registerFunction( "cot", new StandardSQLFunction( "dcot", StandardBasicTypes.DOUBLE ) );
    registerFunction( "ddegrees", new StandardSQLFunction( "ddegrees", StandardBasicTypes.DOUBLE ) );
    registerFunction( "degrees", new StandardSQLFunction( "ddegrees", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dexp", new StandardSQLFunction( "dexp", StandardBasicTypes.DOUBLE ) );
    registerFunction( "exp", new StandardSQLFunction( "dexp", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dlog", new StandardSQLFunction( "dlog", StandardBasicTypes.DOUBLE ) );
    registerFunction( "log", new StandardSQLFunction( "dlog", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dlog10", new StandardSQLFunction( "dlog10", StandardBasicTypes.DOUBLE ) );
    registerFunction( "log10", new StandardSQLFunction( "dlog10", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dradian", new StandardSQLFunction( "dradian", StandardBasicTypes.DOUBLE ) );
    registerFunction( "radian", new StandardSQLFunction( "dradian", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dsin", new StandardSQLFunction( "dsin", StandardBasicTypes.DOUBLE ) );
    registerFunction( "sin", new StandardSQLFunction( "dsin", StandardBasicTypes.DOUBLE ) );
    registerFunction( "soundex", new StandardSQLFunction( "soundex", StandardBasicTypes.STRING ) );
    registerFunction( "dsqrt", new StandardSQLFunction( "dsqrt", StandardBasicTypes.DOUBLE ) );
    registerFunction( "sqrt", new StandardSQLFunction( "dsqrt", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dtan", new StandardSQLFunction( "dtan", StandardBasicTypes.DOUBLE ) );
    registerFunction( "tan", new StandardSQLFunction( "dtan", StandardBasicTypes.DOUBLE ) );
    registerFunction( "dpower", new StandardSQLFunction( "dpower" ) );
    registerFunction( "power", new StandardSQLFunction( "dpower" ) );

    registerFunction( "date", new StandardSQLFunction( "date", StandardBasicTypes.DATE ) );
    registerFunction( "dayofweek", new StandardSQLFunction( "dayofweek", StandardBasicTypes.INTEGER ) );
    registerFunction( "dayofyear", new StandardSQLFunction( "dayofyear", StandardBasicTypes.INTEGER ) );
    registerFunction( "time", new StandardSQLFunction( "time", StandardBasicTypes.TIME ) );
    registerFunction( "timestamp", new StandardSQLFunction( "timestamp", StandardBasicTypes.TIMESTAMP ) );
    registerFunction( "week", new StandardSQLFunction( "week", StandardBasicTypes.INTEGER ) );


    registerFunction( "varchar", new StandardSQLFunction( "varchar", StandardBasicTypes.STRING ) );
    registerFunction( "real", new StandardSQLFunction( "real", StandardBasicTypes.FLOAT ) );
    registerFunction( "bigint", new StandardSQLFunction( "bigint", StandardBasicTypes.LONG ) );
    registerFunction( "char", new StandardSQLFunction( "char", StandardBasicTypes.CHARACTER ) );
    registerFunction( "integer", new StandardSQLFunction( "integer", StandardBasicTypes.INTEGER ) );
    registerFunction( "smallint", new StandardSQLFunction( "smallint", StandardBasicTypes.SHORT ) );

    registerFunction( "ascii_char", new StandardSQLFunction( "ascii_char", StandardBasicTypes.CHARACTER ) );
    registerFunction( "ascii_code", new StandardSQLFunction( "ascii_code", StandardBasicTypes.STRING ) );
    registerFunction( "unicode_char", new StandardSQLFunction( "unicode_char", StandardBasicTypes.LONG ) );
    registerFunction( "unicode_code", new StandardSQLFunction( "unicode_code", StandardBasicTypes.STRING ) );
    registerFunction( "upper", new StandardSQLFunction( "upper" ) );
    registerFunction( "lower", new StandardSQLFunction( "lower" ) );
    registerFunction( "char_length", new StandardSQLFunction( "char_length", StandardBasicTypes.LONG ) );
    registerFunction( "bit_length", new StandardSQLFunction( "bit_length", StandardBasicTypes.STRING ) );

    getDefaultProperties().setProperty( Environment.USE_STREAMS_FOR_BINARY, "true" );
    getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, "50" );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.