@Override @Deprecated public final Field<BigDecimal> exp() { return DSL.exp(numeric()); }
@Override @Deprecated public final Field<BigDecimal> exp() { return DSL.exp(numeric()); }
/** * Get the exp(field) function, taking this field as the power of e. * * @see #exp(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field<BigDecimal> exp(Number value) { return exp(Tools.field(value)); }
/** * Get the exp(field) function, taking this field as the power of e. * * @see #exp(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @Transition( name = "EXP", args = "Field", to = "MathFunction" ) public static Field<BigDecimal> exp(Number value) { return exp(Utils.field(value)); }
/** * Get the hyperbolic cotangent function: coth(field). * <p> * This is not supported by any RDBMS, but emulated using exp exp: * <code><pre>(exp([field] * 2) + 1) / (exp([field] * 2) - 1)</pre></code> */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field<BigDecimal> coth(Field<? extends Number> field) { field = nullSafe(field); return exp(field.mul(2)).add(1).div(exp(field.mul(2)).sub(1)); }
/** * Get the hyperbolic cotangent function: coth(field). * <p> * This is not supported by any RDBMS, but simulated using exp exp: * <code><pre>(exp([field] * 2) + 1) / (exp([field] * 2) - 1)</pre></code> */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @Transition( name = "COTH", args = "Field", to = "MathFunction" ) public static Field<BigDecimal> coth(Field<? extends Number> field) { field = nullSafe(field); return exp(field.mul(2)).add(1).div(exp(field.mul(2)).sub(1)); }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.family()) { case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).add(one()).div(DSL.exp(argument).mul(two())); default: return function("cosh", SQLDataType.NUMERIC, argument); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.family()) { case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).sub(one()).div(DSL.exp(argument).mul(two())); default: return function("sinh", SQLDataType.NUMERIC, argument); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.family()) { case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).sub(one()).div(DSL.exp(argument.mul(two())).add(one())); default: return function("tanh", SQLDataType.NUMERIC, argument); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { case DERBY: case SQLITE: return DSL.exp(DSL.ln(arg1).mul(arg2)); default: return DSL.field("{power}({0}, {1})", SQLDataType.NUMERIC, getArguments()); } } }
case MYSQL: case POSTGRES: return DSL.exp(one());
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxx xxxx xxxx xxxxxxx xxxx xxxxxxxxxx xxxx xxxxxxx xx [/pro] */ case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).add(one()).div(DSL.exp(argument).mul(two())); default: return function("cosh", SQLDataType.NUMERIC, argument); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxx xxxx xxxx xxxxxxx xxxx xxxxxxxxxx xxxx xxxxxxx xx [/pro] */ case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).sub(one()).div(DSL.exp(argument).mul(two())); default: return function("sinh", SQLDataType.NUMERIC, argument); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxxxx xxxxxxxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxxx xxxxx xxxxxx xx [/pro] */ case DERBY: case SQLITE: return DSL.exp(DSL.ln(arg1).mul(arg2)); default: return field("{power}({0}, {1})", SQLDataType.NUMERIC, getArguments()); } } }
@Override final Field<BigDecimal> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxx xxxx xxxx xxxxxxx xxxx xxxxxxxxxx xxxx xxxxxxx xx [/pro] */ case CUBRID: case HSQLDB: case MARIADB: case MYSQL: case POSTGRES: return DSL.exp(argument.mul(two())).sub(one()).div(DSL.exp(argument.mul(two())).add(one())); default: return function("tanh", SQLDataType.NUMERIC, argument); } } }
case MYSQL: case POSTGRES: return DSL.exp(one());
return field; else if (parseFunctionNameIf(ctx, "EXP")) return exp((Field) parseFieldSumParenthesised(ctx));