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 final int`
`ACOS`
ACOS().
`static final int`
`ASIN`
ASIN().
`static final int`
`ATAN`
ATAN().
`static final int`
`COS`
COS().
`static final int`
`COSH`
COSH().
`static final int`
`COT`
COT() (non-standard).
`static final int`
`DEGREES`
DEGREES() (non-standard).
`static final int`
`EXP`
EXP().
`static final int`
`LN`
LN().
`static final int`
`LOG10`
LOG10().
`static final int`
`RADIANS`
RADIANS() (non-standard).
`static final int`
`SIN`
SIN().
`static final int`
`SINH`
SINH().
`static final int`
`SQRT`
SQRT().
`static final int`
`TAN`
TAN().
`static final int`
`TANH`
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
Constructor
Description
`MathFunction1(Expression arg, int function)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
Get the name.
`Value`
`getValue(SessionLocal session)`
Return the resulting value for the current row.
`Expression`
`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, getTypeIfStaticallyKnown, 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 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

## Constructor Details

### MathFunction1

public MathFunction1(Expression arg, int function)

## Method Details

### getValue

public Value getValue(SessionLocal session)
Description copied from class: `Expression`
Return the resulting value for the current row.

Specified by:
  `getValue` in class `Expression`
Parameters:
  `session` - the session
Returns:
  the result

### optimize

public Expression optimize(SessionLocal session)
Description copied from class: `Expression`
Try to optimize the expression.

Specified by:
  `optimize` in class `Expression`
Parameters:
  `session` - the session
Returns:
  the optimized expression

### getName

public String getName()
Description copied from interface: `NamedExpression`
Get the name.

Returns:
  the name in uppercase