use of org.hibernate.dialect.function.CommonFunctionFactory in project hibernate-orm by hibernate.
the class CUBRIDDialect method initializeFunctionRegistry.
@Override
public void initializeFunctionRegistry(QueryEngine queryEngine) {
super.initializeFunctionRegistry(queryEngine);
CommonFunctionFactory functionFactory = new CommonFunctionFactory(queryEngine);
functionFactory.trim2();
functionFactory.space();
functionFactory.reverse();
functionFactory.repeat();
functionFactory.crc32();
functionFactory.cot();
functionFactory.log2();
functionFactory.log10();
functionFactory.pi();
// rand() returns an integer between 0 and 231 on CUBRID
// functionFactory.rand();
functionFactory.radians();
functionFactory.degrees();
functionFactory.systimestamp();
// TODO: CUBRID also has systime()/sysdate() returning TIME/DATE
functionFactory.localtimeLocaltimestamp();
functionFactory.hourMinuteSecond();
functionFactory.yearMonthDay();
functionFactory.dayofweekmonthyear();
functionFactory.lastDay();
functionFactory.weekQuarter();
functionFactory.octetLength();
functionFactory.bitLength();
functionFactory.md5();
functionFactory.trunc();
functionFactory.truncate();
functionFactory.toCharNumberDateTimestamp();
functionFactory.substr();
// also natively supports ANSI-style substring()
functionFactory.instr();
functionFactory.translate();
functionFactory.ceiling_ceil();
functionFactory.sha1();
functionFactory.sha2();
functionFactory.ascii();
functionFactory.char_chr();
functionFactory.position();
// functionFactory.concat_pipeOperator();
functionFactory.insert();
functionFactory.nowCurdateCurtime();
functionFactory.makedateMaketime();
functionFactory.bitandorxornot_bitAndOrXorNot();
functionFactory.median();
functionFactory.stddev();
functionFactory.stddevPopSamp();
functionFactory.variance();
functionFactory.varPopSamp();
functionFactory.datediff();
functionFactory.adddateSubdateAddtimeSubtime();
functionFactory.addMonths();
functionFactory.monthsBetween();
functionFactory.rownumInstOrderbyGroupbyNum();
}
use of org.hibernate.dialect.function.CommonFunctionFactory in project hibernate-orm by hibernate.
the class MimerSQLDialect method initializeFunctionRegistry.
@Override
public void initializeFunctionRegistry(QueryEngine queryEngine) {
super.initializeFunctionRegistry(queryEngine);
CommonFunctionFactory functionFactory = new CommonFunctionFactory(queryEngine);
functionFactory.soundex();
functionFactory.octetLength();
functionFactory.bitLength();
functionFactory.truncate();
functionFactory.repeat();
functionFactory.pad_repeat();
functionFactory.dayofweekmonthyear();
functionFactory.concat_pipeOperator();
functionFactory.position();
functionFactory.localtimeLocaltimestamp();
}
use of org.hibernate.dialect.function.CommonFunctionFactory in project hibernate-orm by hibernate.
the class RDMSOS2200Dialect method initializeFunctionRegistry.
@Override
public void initializeFunctionRegistry(QueryEngine queryEngine) {
super.initializeFunctionRegistry(queryEngine);
CommonFunctionFactory functionFactory = new CommonFunctionFactory(queryEngine);
functionFactory.cosh();
functionFactory.sinh();
functionFactory.tanh();
functionFactory.cot();
functionFactory.log();
functionFactory.log10();
functionFactory.pi();
functionFactory.rand();
functionFactory.trunc();
functionFactory.truncate();
functionFactory.soundex();
functionFactory.trim2();
functionFactory.space();
functionFactory.repeat();
// functionFactory.replicate(); //synonym for more common repeat()
functionFactory.initcap();
functionFactory.instr();
functionFactory.substr();
functionFactory.translate();
functionFactory.yearMonthDay();
functionFactory.hourMinuteSecond();
functionFactory.dayofweekmonthyear();
functionFactory.weekQuarter();
functionFactory.daynameMonthname();
functionFactory.lastDay();
functionFactory.ceiling_ceil();
functionFactory.concat_pipeOperator();
functionFactory.ascii();
functionFactory.chr_char();
functionFactory.insert();
functionFactory.addMonths();
functionFactory.monthsBetween();
}
use of org.hibernate.dialect.function.CommonFunctionFactory in project hibernate-orm by hibernate.
the class TeradataDialect method initializeFunctionRegistry.
@Override
public void initializeFunctionRegistry(QueryEngine queryEngine) {
super.initializeFunctionRegistry(queryEngine);
final BasicTypeRegistry basicTypeRegistry = queryEngine.getTypeConfiguration().getBasicTypeRegistry();
final BasicType<String> stringType = basicTypeRegistry.resolve(StandardBasicTypes.STRING);
CommonFunctionFactory functionFactory = new CommonFunctionFactory(queryEngine);
functionFactory.concat_pipeOperator();
functionFactory.octetLength();
functionFactory.moreHyperbolic();
functionFactory.instr();
functionFactory.substr();
functionFactory.substring_substr();
// also natively supports ANSI-style substring()
functionFactory.position();
functionFactory.bitLength_pattern("octet_length(cast(?1 as char))*4");
queryEngine.getSqmFunctionRegistry().patternDescriptorBuilder("mod", "(?1 mod ?2)").setInvariantType(stringType).setExactArgumentCount(2).register();
if (getVersion().isSameOrAfter(14)) {
// list actually taken from Teradata 15 docs
functionFactory.lastDay();
functionFactory.initcap();
functionFactory.trim2();
functionFactory.soundex();
functionFactory.ascii();
functionFactory.char_chr();
functionFactory.trunc();
functionFactory.moreHyperbolic();
functionFactory.monthsBetween();
functionFactory.addMonths();
functionFactory.stddevPopSamp();
functionFactory.varPopSamp();
}
// No idea since when this is supported
functionFactory.windowFunctions();
functionFactory.inverseDistributionOrderedSetAggregates();
functionFactory.hypotheticalOrderedSetAggregates();
}
use of org.hibernate.dialect.function.CommonFunctionFactory in project hibernate-orm by hibernate.
the class TimesTenDialect method initializeFunctionRegistry.
@Override
public void initializeFunctionRegistry(QueryEngine queryEngine) {
super.initializeFunctionRegistry(queryEngine);
CommonFunctionFactory functionFactory = new CommonFunctionFactory(queryEngine);
functionFactory.trim2();
functionFactory.soundex();
functionFactory.trunc();
functionFactory.toCharNumberDateTimestamp();
functionFactory.ceiling_ceil();
functionFactory.instr();
functionFactory.substr();
functionFactory.substring_substr();
functionFactory.leftRight_substr();
functionFactory.char_chr();
functionFactory.rownumRowid();
functionFactory.sysdate();
functionFactory.addMonths();
functionFactory.monthsBetween();
queryEngine.getSqmFunctionRegistry().registerBinaryTernaryPattern("locate", queryEngine.getTypeConfiguration().getBasicTypeRegistry().resolve(StandardBasicTypes.INTEGER), "instr(?2,?1)", "instr(?2,?1,?3)", STRING, STRING, INTEGER, queryEngine.getTypeConfiguration()).setArgumentListSignature("(pattern, string[, start])");
}
Aggregations