BsonObjectID

Represents a BSON object id (Bson.Type.binData).

Constructors

this
this(ubyte[] bytes)

Constructs a new object ID from the given raw byte array.

Members

Aliases

fromHexString
alias fromHexString = fromString

Creates an on object ID from a string in standard hexa-decimal form.

Functions

opCast
ubyte[] opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(BsonObjectID other)

Allows for relational comparison of different IDs.

toString
string toString()

Converts the ID to its standard hexa-decimal string representation.

Properties

timeStamp
SysTime timeStamp [@property getter]

Extracts the time/date portion of the object ID.

valid
bool valid [@property getter]

Returns true for any non-zero ID.

Static functions

createDateID
BsonObjectID createDateID(SysTime time)

Creates a pseudo object ID that matches the given date.

fromString
BsonObjectID fromString(string str)

Creates an on object ID from a string in standard hexa-decimal form.

generate
BsonObjectID generate(SysTime time)

Generates a unique object ID. * * By default it will use the Clock.currTime(UTC()) as timestamp * which guarantees that BsonObjectIDs are chronologically * sorted.

Meta