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
A math function with one argument and DOUBLE PRECISION result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
ACOS().static final int
ASIN().static final int
ATAN().static final int
COS().static final int
COSH().static final int
COT() (non-standard).static final int
DEGREES() (non-standard).static final int
EXP().private final int
static final int
LN().static final int
LOG10().private static final String[]
static final int
RADIANS() (non-standard).static final int
SIN().static final int
SINH().static final int
SQRT().static final int
TAN().static final int
TANH().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 -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the name.getValue
(SessionLocal session) Return the resulting value for the current row.optimize
(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 Details
-
SIN
public static final int SINSIN().- See Also:
-
COS
public static final int COSCOS().- See Also:
-
TAN
public static final int TANTAN().- See Also:
-
COT
public static final int COTCOT() (non-standard).- See Also:
-
SINH
public static final int SINHSINH().- See Also:
-
COSH
public static final int COSHCOSH().- See Also:
-
TANH
public static final int TANHTANH().- See Also:
-
ASIN
public static final int ASINASIN().- See Also:
-
ACOS
public static final int ACOSACOS().- See Also:
-
ATAN
public static final int ATANATAN().- See Also:
-
LOG10
public static final int LOG10LOG10().- See Also:
-
LN
public static final int LNLN().- See Also:
-
EXP
public static final int EXPEXP().- See Also:
-
SQRT
public static final int SQRTSQRT().- See Also:
-
DEGREES
public static final int DEGREESDEGREES() (non-standard).- See Also:
-
RADIANS
public static final int RADIANSRADIANS() (non-standard).- See Also:
-
NAMES
-
function
private final int function
-
-
Constructor Details
-
MathFunction1
-
-
Method Details
-
getValue
Description copied from class:Expression
Return the resulting value for the current row.- Specified by:
getValue
in classExpression
- Parameters:
session
- the session- Returns:
- the result
-
optimize
Description copied from class:Expression
Try to optimize the expression.- Specified by:
optimize
in classExpression
- Parameters:
session
- the session- Returns:
- the optimized expression
-
getName
Description copied from interface:NamedExpression
Get the name.- Returns:
- the name in uppercase
-