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

    层级 (查看层级一览)

    索引

    构造函数

    • 参数

      • int: bigint

        A 64-bit bigint representing the Timestamp.

      返回 BSON.Timestamp

    • 参数

      • long: BSON.Long

        A 64-bit Long representing the Timestamp.

      返回 BSON.Timestamp

    • 参数

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

        A pair of two values indicating timestamp and increment.

      返回 BSON.Timestamp

    属性

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

      • (other: string | number | BSON.Long | BSON.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 | BSON.Long | BSON.Timestamp) => BSON.Long

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

    eqz: () => boolean

    类型声明

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

        返回 boolean

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

    neg: () => BSON.Long

    类型声明

    negate: () => BSON.Long

    类型声明

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

    类型声明

    not: () => BSON.Long

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

        参数

        • numBits: number | BSON.Long

          Number of bits

        返回 BSON.Long

        Shifted Long

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

    类型声明

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

        参数

        • numBits: number | BSON.Long

          Number of bits

        返回 BSON.Long

        Shifted Long

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

    类型声明

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

        参数

        • numBits: number | BSON.Long

          Number of bits

        返回 BSON.Long

        Shifted Long

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

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

    类型声明

    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: () => BSON.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: () => BSON.Long

    类型声明

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

    类型声明

    MAX_VALUE: BSON.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.

      返回 BSON.Timestamp

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

      参数

      • value: number

      返回 BSON.Timestamp

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

      参数

      • value: number

      返回 BSON.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.

      返回 BSON.Timestamp