Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

_bsontype: "Timestamp"
MAX_VALUE: Long
sub: ((subtrahend: string | number | Timestamp | Long) => Long)

Type declaration

compare: ((other: string | number | Timestamp | Long) => 0 | 1 | -1)

Type declaration

    • 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

equals: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value equals the specified's.

      Parameters

      Returns boolean

__isLong__: true
high: number
low: number
unsigned: boolean
add: ((addend: string | number | Timestamp | Long) => Long)

Type declaration

and: ((other: string | number | Timestamp | Long) => Long)

Type declaration

comp: ((other: string | number | Timestamp | Long) => 0 | 1 | -1)

Type declaration

divide: ((divisor: string | number | Timestamp | Long) => Long)

Type declaration

    • 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

div: ((divisor: string | number | Timestamp | Long) => Long)

Type declaration

eq: ((other: string | number | Timestamp | Long) => 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: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value is greater than the specified's.

      Parameters

      Returns boolean

gt: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

greaterThanOrEqual: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value is greater than or equal the specified's.

      Parameters

      Returns boolean

gte: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

ge: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

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

lessThan: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value is less than the specified's.

      Parameters

      Returns boolean

lt: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • This is an alias of {@link Long#lessThan}.

      Parameters

      Returns boolean

lessThanOrEqual: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value is less than or equal the specified's.

      Parameters

      Returns boolean

lte: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

modulo: ((divisor: string | number | Timestamp | Long) => Long)

Type declaration

mod: ((divisor: string | number | Timestamp | Long) => Long)

Type declaration

rem: ((divisor: string | number | Timestamp | Long) => Long)

Type declaration

multiply: ((multiplier: string | number | Timestamp | Long) => Long)

Type declaration

    • Returns the product of this and the specified Long.

      Parameters

      Returns Long

      Product

mul: ((multiplier: string | number | Timestamp | Long) => Long)

Type declaration

negate: (() => Long)

Type declaration

    • Returns the Negation of this Long's value.

      Returns Long

neg: (() => Long)

Type declaration

not: (() => Long)

Type declaration

    • Returns the bitwise NOT of this Long.

      Returns Long

notEquals: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

    • Tests if this Long's value differs from the specified's.

      Parameters

      Returns boolean

neq: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

ne: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

or: ((other: string | number | Long) => Long)

Type declaration

    • Returns the bitwise OR of this Long and the specified.

      Parameters

      • other: string | number | Long

      Returns Long

shiftLeft: ((numBits: number | Long) => Long)

Type declaration

    • Returns this Long with bits shifted to the left by the given amount.

      Parameters

      • numBits: number | Long

        Number of bits

      Returns Long

      Shifted Long

shl: ((numBits: number | Long) => Long)

Type declaration

shiftRight: ((numBits: number | Long) => Long)

Type declaration

    • 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

shr: ((numBits: number | Long) => Long)

Type declaration

shiftRightUnsigned: ((numBits: number | Long) => Long)

Type declaration

    • 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

shr_u: ((numBits: number | Long) => Long)

Type declaration

shru: ((numBits: number | Long) => Long)

Type declaration

subtract: ((subtrahend: string | number | Timestamp | Long) => Long)

Type declaration

    • Returns the difference of this and the specified Long.

      Parameters

      Returns Long

      Difference

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

toBigInt: (() => bigint)

Type declaration

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

      Returns bigint

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

Type declaration

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

      Parameters

      • Optional le: boolean

        Whether little or big endian, defaults to big endian

      Returns number[]

      Byte representation

toBytesLE: (() => number[])

Type declaration

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

      Returns number[]

      Little endian byte representation

toBytesBE: (() => number[])

Type declaration

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

      Returns number[]

      Big endian byte representation

toSigned: (() => Long)

Type declaration

    • Converts this Long to signed.

      Returns Long

toUnsigned: (() => Long)

Type declaration

    • Converts this Long to unsigned.

      Returns Long

xor: ((other: string | number | Long) => Long)

Type declaration

    • Returns the bitwise XOR of this Long and the given one.

      Parameters

      • other: string | number | Long

      Returns Long

eqz: (() => boolean)

Type declaration

    • (): boolean
le: ((other: string | number | Timestamp | Long) => boolean)

Type declaration

Constructors

  • Parameters

    Returns Timestamp

  • Parameters

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

      A pair of two values indicating timestamp and increment.

      • t: number
      • i: number

    Returns Timestamp

  • deprecated

    Please use Timestamp({ t: high, i: low }) or Timestamp(Long(low, high)) instead.

    Parameters

    • low: number

      the low (signed) 32 bits of the Timestamp.

    • high: number

      the high (signed) 32 bits of the Timestamp.

    Returns Timestamp

Methods

  • toJSON(): { $timestamp: string }
  • Returns { $timestamp: string }

    • $timestamp: string
  • 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

  • fromBits(lowBits: number, highBits: number): Timestamp
  • 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

  • fromString(str: string, optRadix: number): 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

  • inspect(): string
  • Returns string

  • toString(radix?: number): string
  • Returns a string representation of an object.

    Parameters

    • Optional radix: number

    Returns string

Generated using TypeDoc