API 参考
    正在准备搜索索引...

    层级 (查看层级一览)

    索引

    构造函数

    • 参数

      • int: bigint

        A 64-bit bigint representing the Timestamp.

      返回 Timestamp

    • 参数

      • long: Long

        A 64-bit Long representing the Timestamp.

      返回 Timestamp

    • 参数

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

        A pair of two values indicating timestamp and increment.

      返回 Timestamp

    属性

    __isLong__: boolean
    add: (addend: string | number | Long | Timestamp) => Long

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

        参数

        返回 -1 | 0 | 1

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

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

    类型声明

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

    类型声明

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

        参数

        返回 Long

        Quotient

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

    类型声明

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

    类型声明

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

        参数

        返回 boolean

    eqz: () => boolean

    类型声明

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

        返回 boolean

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

    类型声明

    getHighBits: () => number

    类型声明

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

        返回 number

    getHighBitsUnsigned: () => number

    类型声明

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

        返回 number

    getLowBits: () => number

    类型声明

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

        返回 number

    getLowBitsUnsigned: () => number

    类型声明

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

        返回 number

    getNumBitsAbs: () => number

    类型声明

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

        返回 number

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

    类型声明

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

        参数

        返回 boolean

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

    类型声明

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

        参数

        返回 boolean

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

    类型声明

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

    类型声明

    high: number
    isEven: () => boolean

    类型声明

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

        返回 boolean

    isNegative: () => boolean

    类型声明

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

        返回 boolean

    isOdd: () => boolean

    类型声明

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

        返回 boolean

    isPositive: () => boolean

    类型声明

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

        返回 boolean

    isZero: () => boolean

    类型声明

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

        返回 boolean

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

    类型声明

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

    类型声明

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

        参数

        返回 boolean

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

    类型声明

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

        参数

        返回 boolean

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

      • (multiplier: string | number | Long | Timestamp): Long
      • Returns the product of this and the specified Long.

        参数

        返回 Long

        Product

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

    类型声明

    neg: () => Long

    类型声明

    negate: () => Long

    类型声明

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

        返回 Long

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

    类型声明

    not: () => Long

    类型声明

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

        返回 Long

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

    类型声明

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

        参数

        返回 boolean

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

    类型声明

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

        参数

        • other: string | number | Long

        返回 Long

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

    类型声明

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

    类型声明

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

        参数

        • numBits: number | Long

          Number of bits

        返回 Long

        Shifted Long

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

    类型声明

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

        参数

        • numBits: number | Long

          Number of bits

        返回 Long

        Shifted Long

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

    类型声明

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

        参数

        • numBits: number | Long

          Number of bits

        返回 Long

        Shifted Long

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

      • (subtrahend: string | number | Long | Timestamp): Long
      • Returns the difference of this and the specified Long.

        参数

        返回 Long

        Difference

    toBigInt: () => bigint

    类型声明

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

        返回 bigint

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

    类型声明

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

        参数

        • 可选le: boolean

          Whether little or big endian, defaults to big endian

        返回 number[]

        Byte representation

    toBytesBE: () => number[]

    类型声明

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

        返回 number[]

        Big endian byte representation

    toBytesLE: () => number[]

    类型声明

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

        返回 number[]

        Little endian byte representation

    toInt: () => number

    类型声明

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

        返回 number

    toNumber: () => number

    类型声明

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

        返回 number

    toSigned: () => Long

    类型声明

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

        返回 Long

    toString: (radix?: number) => string

    类型声明

      • (radix?: number): string
      • Converts the Long to a string written in the specified radix.

        参数

        • 可选radix: number

          Radix (2-36), defaults to 10

        返回 string

        RangeError If radix is out of range

    toUnsigned: () => Long

    类型声明

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

        返回 Long

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

    类型声明

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

        参数

        • other: string | number | Long

        返回 Long

    MAX_VALUE: Long

    访问器

    • get _bsontype(): "Timestamp"

      返回 "Timestamp"

    方法

    • 返回 string

    • 返回 { $timestamp: string }

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

      参数

      • lowBits: number

        the low 32-bits.

      • highBits: number

        the high 32-bits.

      返回 Timestamp

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

      参数

      • value: number

      返回 Timestamp

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

      参数

      • value: number

      返回 Timestamp

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

      参数

      • str: string

        the textual representation of the Timestamp.

      • optRadix: number

        the radix in which the text is written.

      返回 Timestamp