JavaScript API for Oracle type NUMBER.

Hierarchy

  • OracleNumber

Constructors

  • Construct an OracleNumber from a JavaScript number or a string.

    Parameters

    • n: string | number

    Returns OracleNumber

Properties

e: OracleNumber = ...

The e constant.

ln10: OracleNumber = ...

The ln10 constant.

pi: OracleNumber = ...

The pi constant.

zero: OracleNumber = ...

The zero constant.

Methods

  • Computes the absolute value of the Oracle number

    Returns

    the absolute value of the Oracle number

    Returns OracleNumber

  • Computes the arc cosine in radians of the Oracle number

    Returns

    the arc cosine in radians of the Oracle number

    Returns OracleNumber

  • Computes the arc sine in radians of the Oracle number

    Returns

    the arc sine in radians of the Oracle number

    Returns OracleNumber

  • Computes the arc tangent in radians of the Oracle number

    Returns

    the arc tangent in radians of the Oracle number

    Returns OracleNumber

  • Returns any

  • Computes the ceiling of the Oracle number

    Returns

    the ceiling of the Oracle number

    Returns OracleNumber

  • Compares two Oracle numbers

    Returns

    -1 if this < other 0 if this = other 1 if this > other

    Parameters

    Returns number

  • Checks if the Oracle number is equal to another Oracle number

    Returns

    true if both Oracle numbers are equal otherwise false

    Parameters

    Returns boolean

  • Raises e to the power of this Oracle number

    Returns

    the result of the exponentiation as Oracle number

    Returns OracleNumber

  • Computes the floor of the number

    Returns

    the floor value of the Oracle number

    Returns OracleNumber

  • Computes the hyperbolic cosine of the Oracle number

    Returns

    the hyperbolic cosine of the Oracle number

    Returns OracleNumber

  • Computes the hyperbolic sine of the Oracle number

    Returns

    the hyperbolic sine of the Oracle number

    Returns OracleNumber

  • Computes the hyperbolic tangent of the Oracle number

    Returns

    the hyperbolic tangent of the Oracle number

    Returns OracleNumber

  • Tests if the number is an integer

    Returns

    true if the Oracle number is an integer otherwise false

    Returns boolean

  • Returns boolean

  • Tests if the number is zero

    Returns

    true if the Oracle number is zero otherwise false

    Returns boolean

  • Computes the natural logarithm of the Oracle number

    Returns

    the natural logarithm of the Oracle number

    Returns OracleNumber

  • Scale the digits to the left and right of the decimal point.

    Returns

    a new scaled Oracle number scaled according to the arguments

    Throws

    throws an exception if the number of left-hand-side digits is exceeded

    Parameters

    • left: number

      maximum number of decimal digits to the left of the decimal point. It will not effect the number, but throw an exception if this value is exceeded.

    • right: number

      maximum number of decimal digits to the right of the decimal point. The number is rounded at this point. Negative values are allowed.

    Returns OracleNumber

  • Shift the number by the specified number of decimal places

    Returns

    an Oracle number containing the shifted result

    Parameters

    • digits: number | OracleNumber

      number of decimal places to shift. It can be negative. Positive values shift the decimal place to the right and negative values to the left. For example, if NUMBER corresponds to 1234.5 and digits == -1, the new NUMBER object will correspond to 123.45.

    Returns OracleNumber

  • Returns -1 if the sign of the number is negative, 0 if the number is 0, and > 0 if the number is positive.

    Returns

    a number indicating the sign of the Oracle number

    Returns number

  • Computes the square root of the Oracle number

    Returns

    the square root of the Oracle number

    Returns OracleNumber

  • Subtracts an Oracle number from the Oracle number and returns the resulting Oracle number

    Returns

    the result of the subtraction as OracleNumber

    Parameters

    • other: OracleNumber

      the other number to be subtracted from the OracleNumber

    Returns OracleNumber

  • Computes the tangent of the Oracle number

    Returns

    the tangent of the Oracle number

    Returns OracleNumber

  • Converts an Oracle NUMBER to type number

    Returns

    the converted number

    Returns number

  • Converts an Oracle NUMBER to a string, with an optional number format and NLS parameters. If no format string and NLS parameters are provided, the default values for the session are used.

    Returns

    the converted string

    Parameters

    • Optional format: string

      optional number format

    • Optional nlsParam: string

      optional NLS parameters

    Returns string

  • Truncate the number to the specified number of decimal places.

    Returns

    a truncated Oracle number

    Parameters

    • decplace: number | OracleNumber

      Number of decimal digits to the right of the decimal point at which to truncate. Negative values are allowed.

    Returns OracleNumber

  • Construct an OracleNumber from a JavaScript number.

    Returns

    a new OracleNumber object

    Parameters

    • n: number

    Returns OracleNumber

  • Parse a string into an OracleNumber, with an optional number format and NLS parameters. If no format string and NLS parameters are provided, the default values for the session are used.

    Returns

    OracleNumber value from parsing the input string

    Parameters

    • s: string

      the number string

    • Optional format: string

      optional number format

    • Optional nlsParam: string

      optional NLS parameters

    Returns OracleNumber