Package org.h2.expression.function
Class MathFunction1
- java.lang.Object
-
- org.h2.expression.Expression
-
- org.h2.expression.Operation1
-
- org.h2.expression.function.Function1
-
- org.h2.expression.function.MathFunction1
-
- All Implemented Interfaces:
NamedExpression,HasSQL,Typed
public final class MathFunction1 extends Function1
A math function with one argument and DOUBLE PRECISION result.
-
-
Field Summary
Fields Modifier and Type Field Description static intACOSACOS().static intASINASIN().static intATANATAN().static intCOSCOS().static intCOSHCOSH().static intCOTCOT() (non-standard).static intDEGREESDEGREES() (non-standard).static intEXPEXP().private intfunctionstatic intLNLN().static intLOG10LOG10().private static java.lang.String[]NAMESstatic intRADIANSRADIANS() (non-standard).static intSINSIN().static intSINHSINH().static intSQRTSQRT().static intTANTAN().static intTANHTANH().-
Fields inherited from class org.h2.expression.Operation1
arg, type
-
Fields inherited from class org.h2.expression.Expression
AUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESES
-
Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
-
-
Constructor Summary
Constructors Constructor Description MathFunction1(Expression arg, int function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Get the name.ValuegetValue(SessionLocal session)Return the resulting value for the current row.Expressionoptimize(SessionLocal session)Try to optimize the expression.-
Methods inherited from class org.h2.expression.function.Function1
getUnenclosedSQL
-
Methods inherited from class org.h2.expression.Operation1
getCost, getSubexpression, getSubexpressionCount, getType, isEverything, mapColumns, setEvaluatable, updateAggregate
-
Methods inherited from class org.h2.expression.Expression
addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getColumnNameForView, getEnclosedSQL, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getSQL, getSQL, getSQL, getTableAlias, getTableName, getWhenSQL, getWhenValue, isConstant, isIdentity, isNullConstant, isValueSet, isWhenConditionOperand, needParentheses, optimizeCondition, toString, writeExpressions, writeExpressions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
-
-
-
Field Detail
-
SIN
public static final int SIN
SIN().- See Also:
- Constant Field Values
-
COS
public static final int COS
COS().- See Also:
- Constant Field Values
-
TAN
public static final int TAN
TAN().- See Also:
- Constant Field Values
-
COT
public static final int COT
COT() (non-standard).- See Also:
- Constant Field Values
-
SINH
public static final int SINH
SINH().- See Also:
- Constant Field Values
-
COSH
public static final int COSH
COSH().- See Also:
- Constant Field Values
-
TANH
public static final int TANH
TANH().- See Also:
- Constant Field Values
-
ASIN
public static final int ASIN
ASIN().- See Also:
- Constant Field Values
-
ACOS
public static final int ACOS
ACOS().- See Also:
- Constant Field Values
-
ATAN
public static final int ATAN
ATAN().- See Also:
- Constant Field Values
-
LOG10
public static final int LOG10
LOG10().- See Also:
- Constant Field Values
-
LN
public static final int LN
LN().- See Also:
- Constant Field Values
-
EXP
public static final int EXP
EXP().- See Also:
- Constant Field Values
-
SQRT
public static final int SQRT
SQRT().- See Also:
- Constant Field Values
-
DEGREES
public static final int DEGREES
DEGREES() (non-standard).- See Also:
- Constant Field Values
-
RADIANS
public static final int RADIANS
RADIANS() (non-standard).- See Also:
- Constant Field Values
-
NAMES
private static final java.lang.String[] NAMES
-
function
private final int function
-
-
Constructor Detail
-
MathFunction1
public MathFunction1(Expression arg, int function)
-
-
Method Detail
-
getValue
public Value getValue(SessionLocal session)
Description copied from class:ExpressionReturn the resulting value for the current row.- Specified by:
getValuein classExpression- Parameters:
session- the session- Returns:
- the result
-
optimize
public Expression optimize(SessionLocal session)
Description copied from class:ExpressionTry to optimize the expression.- Specified by:
optimizein classExpression- Parameters:
session- the session- Returns:
- the optimized expression
-
getName
public java.lang.String getName()
Description copied from interface:NamedExpressionGet the name.- Returns:
- the name in uppercase
-
-