This is the cl-mongo-id Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:14:43 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-mongo-id
A library for the creation/parsing of MongoDB Object IDs
Andrew Lyon <orthecreedence@gmail.com>
MIT
0.1.0
bordeaux-threads
(system).
md5
(system).
local-time
(system).
secure-random
(system).
mongo-id.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-mongo-id/mongo-id.lisp
cl-mongo-id
(system).
get-hostname
(function).
get-inc
(function).
get-pid
(function).
get-timestamp
(function).
oid
(function).
oid-str
(function).
*id-inc*
(special variable).
*id-inc-lock*
(special variable).
*random-value*
(special variable).
convert-hex-vector
(function).
convert-vector-int
(function).
create-new-id
(function).
get-current-pid
(function).
get-current-timestamp
(function).
get-inc-val
(function).
Packages are listed by definition order.
cl-mongo-id
mongoid
common-lisp
.
get-hostname
(function).
get-inc
(function).
get-pid
(function).
get-timestamp
(function).
oid
(function).
oid-str
(function).
*id-inc*
(special variable).
*id-inc-lock*
(special variable).
*random-value*
(special variable).
convert-hex-vector
(function).
convert-vector-int
(function).
create-new-id
(function).
get-current-pid
(function).
get-current-timestamp
(function).
get-inc-val
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Grab the inc value out of a vector oid. Passing :bytes t will return an array of bytes corresponding to the inc value of the ID instead of parsing it as an integer.
Grab the timestamp out of a vector oid. Passing :bytes t will return an array of bytes corresponding to the timestamp part of the ID instead of parsing it as an integer.
Generate a mongo id, in byte vector format.
Given a vector ID, convert it to a string.
Takes a hex string, IE 4f2b8096 and converts it into a byte array:
4f2b8096 -> #(79 43 128 150)
Hex string *must* have even number of bytes.
Convert a byte array to an integer: #(79 150 243 81) -> 1335292753
Create a brand-spankin-new ObjectId using the current timestamp/inc values, along with hostname and process pid.
Get the current process’ PID. This function does it’s best to be cross- implementation. If it isn’t able to grab the PID from the system, it defaults to returning whatever value is passed into the :if-not-exists-return key.
Get current unix timestamp.
Thread-safe method to get current ObjectId inc value. Takes an optional timestamp value to calculate inc for.
Jump to: | C F G O |
---|
Jump to: | C F G O |
---|
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | C F M P S |
---|
Jump to: | C F M P S |
---|