-
Notifications
You must be signed in to change notification settings - Fork 23
Object ID
develephant edited this page Feb 4, 2016
·
1 revision
Each Mongo document contains a special Object ID object (_id
).
Methods:
The object id string representation.
Parameters
None
Returns
A string
local id_str = doc._id:tostring()
The timestamp of the object id.
Parameters
None
Returns
Timestamp
local ts = doc._id:get_ts()
The process identifier.
Parameters
None
Returns
A process id.
local pid = doc._id:get_pid()
The object id hostname.
Parameters
None
Returns
A hostname
local hostname = doc._id:get_hostname()
Unknown usage.
Parameters
None
Returns
Unknown
local inc = doc._id:get_inc()