Hierarchy

Constructors

  • Parameters

    • int: bigint

      A 64-bit bigint representing the Timestamp.

    Returns Timestamp

  • Parameters

    • long: Long

      A 64-bit Long representing the Timestamp.

    Returns Timestamp

  • Parameters

    • value: {
          i: number;
          t: number;
      }

      A pair of two values indicating timestamp and increment.

      • i: number
      • t: number

    Returns Timestamp

Properties

__isLong__: boolean
add: ((addend) => Long)

Type declaration

    • (addend): Long
    • Returns the sum of this and the specified Long.

      Parameters

      Returns Long

and: ((other) => Long)

Type declaration

    • (other): Long
    • Returns the sum of this and the specified Long.

      Parameters

      Returns Long

      Sum

comp: ((other) => 0 | 1 | -1)

Type declaration

    • (other): 0 | 1 | -1
    • This is an alias of Long.compare

      Parameters

      Returns 0 | 1 | -1

compare: ((other) => 0 | 1 | -1)

Type declaration

    • (other): 0 | 1 | -1
    • Compares this Long's value with the specified's.

      Parameters

      Returns 0 | 1 | -1

      0 if they are the same, 1 if the this is greater and -1 if the given one is greater

div: ((divisor) => Long)

Type declaration

divide: ((divisor) => Long)

Type declaration

    • (divisor): Long
    • Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned.

      Parameters

      Returns Long

      Quotient

eq: ((other) => boolean)

Type declaration

equals: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value equals the specified's.

      Parameters

      Returns boolean

eqz: (() => boolean)

Type declaration

    • (): boolean
    • This is an alias of Long.isZero

      Returns boolean

ge: ((other) => boolean)

Type declaration

getHighBits: (() => number)

Type declaration

    • (): number
    • Gets the high 32 bits as a signed integer.

      Returns number

getHighBitsUnsigned: (() => number)

Type declaration

    • (): number
    • Gets the high 32 bits as an unsigned integer.

      Returns number

getLowBits: (() => number)

Type declaration

    • (): number
    • Gets the low 32 bits as a signed integer.

      Returns number

getLowBitsUnsigned: (() => number)

Type declaration

    • (): number
    • Gets the low 32 bits as an unsigned integer.

      Returns number

getNumBitsAbs: (() => number)

Type declaration

    • (): number
    • Gets the number of bits needed to represent the absolute value of this Long.

      Returns number

greaterThan: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is greater than the specified's.

      Parameters

      Returns boolean

greaterThanOrEqual: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is greater than or equal the specified's.

      Parameters

      Returns boolean

gt: ((other) => boolean)

Type declaration

gte: ((other) => boolean)

Type declaration

high: number
isEven: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is even.

      Returns boolean

isNegative: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is negative.

      Returns boolean

isOdd: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is odd.

      Returns boolean

isPositive: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is positive.

      Returns boolean

isZero: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value equals zero.

      Returns boolean

le: ((other) => boolean)

Type declaration

lessThan: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is less than the specified's.

      Parameters

      Returns boolean

lessThanOrEqual: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is less than or equal the specified's.

      Parameters

      Returns boolean

low: number
lt: ((other) => boolean)

Type declaration

lte: ((other) => boolean)

Type declaration

mod: ((divisor) => Long)

Type declaration

modulo: ((divisor) => Long)

Type declaration

    • (divisor): Long
    • Returns this Long modulo the specified.

      Parameters

      Returns Long

mul: ((multiplier) => Long)

Type declaration

multiply: ((multiplier) => Long)

Type declaration

    • (multiplier): Long
    • Returns the product of this and the specified Long.

      Parameters

      Returns Long

      Product

ne: ((other) => boolean)

Type declaration

neg: (() => Long)

Type declaration

negate: (() => Long)

Type declaration

    • (): Long
    • Returns the Negation of this Long's value.

      Returns Long

neq: ((other) => boolean)

Type declaration

not: (() => Long)

Type declaration

    • (): Long
    • Returns the bitwise NOT of this Long.

      Returns Long

notEquals: ((other) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value differs from the specified's.

      Parameters

      Returns boolean

or: ((other) => Long)

Type declaration

    • (other): Long
    • Returns the bitwise OR of this Long and the specified.

      Parameters

      • other: string | number | Long

      Returns Long

rem: ((divisor) => Long)

Type declaration

shiftLeft: ((numBits) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits shifted to the left by the given amount.

      Parameters

      • numBits: number | Long

        Number of bits

      Returns Long

      Shifted Long

shiftRight: ((numBits) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits arithmetically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

        Number of bits

      Returns Long

      Shifted Long

shiftRightUnsigned: ((numBits) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits logically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

        Number of bits

      Returns Long

      Shifted Long

shl: ((numBits) => Long)

Type declaration

shr: ((numBits) => Long)

Type declaration

shr_u: ((numBits) => Long)

Type declaration

shru: ((numBits) => Long)

Type declaration

sub: ((subtrahend) => Long)

Type declaration

subtract: ((subtrahend) => Long)

Type declaration

    • (subtrahend): Long
    • Returns the difference of this and the specified Long.

      Parameters

      Returns Long

      Difference

toBigInt: (() => bigint)

Type declaration

    • (): bigint
    • Converts the Long to a BigInt (arbitrary precision).

      Returns bigint

toBytes: ((le?) => number[])

Type declaration

    • (le?): number[]
    • Converts this Long to its byte representation.

      Parameters

      • Optional le: boolean

        Whether little or big endian, defaults to big endian

        Optional

      Returns number[]

      Byte representation

toBytesBE: (() => number[])

Type declaration

    • (): number[]
    • Converts this Long to its big endian byte representation.

      Returns number[]

      Big endian byte representation

toBytesLE: (() => number[])

Type declaration

    • (): number[]
    • Converts this Long to its little endian byte representation.

      Returns number[]

      Little endian byte representation

toInt: (() => number)

Type declaration

    • (): number
    • Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.

      Returns number

toNumber: (() => number)

Type declaration

    • (): number
    • Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).

      Returns number

toSigned: (() => Long)

Type declaration

    • (): Long
    • Converts this Long to signed.

      Returns Long

toUnsigned: (() => Long)

Type declaration

    • (): Long
    • Converts this Long to unsigned.

      Returns Long

unsigned: boolean
xor: ((other) => Long)

Type declaration

    • (other): Long
    • Returns the bitwise XOR of this Long and the given one.

      Parameters

      • other: string | number | Long

      Returns Long

MAX_VALUE: Long

Accessors

  • get _bsontype(): "Timestamp"
  • Returns "Timestamp"

Methods

  • Returns string

  • Returns {
        $timestamp: string;
    }

    • $timestamp: string
  • Converts the Long to a string written in the specified radix.

    Parameters

    • Optional radix: number

      Radix (2-36), defaults to 10

      Optional

    Returns string

    Throws

    RangeError If radix is out of range

  • Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.

    Parameters

    • lowBits: number

      the low 32-bits.

    • highBits: number

      the high 32-bits.

    Returns Timestamp

  • Returns a Timestamp represented by the given (32-bit) integer value.

    Parameters

    • value: number

    Returns Timestamp

  • Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned.

    Parameters

    • value: number

    Returns Timestamp

  • Returns a Timestamp from the given string, optionally using the given radix.

    Parameters

    • str: string

      the textual representation of the Timestamp.

    • optRadix: number

      the radix in which the text is written.

    Returns Timestamp

Generated using TypeDoc