ObjectId | mongodb (original) (raw)
Hierarchy (view full)
- BSONValue
- ObjectId
Index
Constructors
constructor
- new ObjectId(inputId): ObjectId
Parameters
- inputId: number
Returns ObjectId
- new ObjectId(inputId): ObjectId
Parameters
- inputId: string
Returns ObjectId
- new ObjectId(inputId): ObjectId
ObjectId
Returns- new ObjectId(inputId): ObjectId
ObjectId
Returns- new ObjectId(inputId): ObjectId
Parameters
- inputId: Uint8Array
Returns ObjectId
Properties
Static
cacheHexString
cacheHexString: boolean
Accessors
_bsontype
- get _bsontype(): "ObjectId"
Returns "ObjectId"
id
- get id(): Uint8Array
Returns Uint8Array
Methods
equals
- equals(otherId): boolean
Returns boolean
getTimestamp
- getTimestamp(): Date
Returns Date
inspect
- inspect(depth?, options?, inspect?): string
Parameters
Optional
depth: numberOptional
options: unknownOptional
inspect: InspectFn
Returns string
return the 24 character hex string representation.
toHexString
- toHexString(): string
Returns string
toJSON
- toJSON(): string
Returns string
toString
- toString(encoding?): string
Parameters
Optional
encoding: "base64" | "hex"
Returns string
Static
createFromBase64
Static
createFromHexString
- createFromHexString(hexString): ObjectId
Parameters
- hexString: string
Returns ObjectId
Static
createFromTime
Static
generate
- generate(time?): Uint8Array
Parameters
Optional
time: number
Returns Uint8Array
Static
isValid
- isValid(id): boolean
Returns boolean