UUID generation and manipulation utilities following RFC9562.
Supports generation of:
UUID generation and manipulation utilities following RFC9562. Supports generation of: - v0: Null UUID - v1: Time-based UUID - v3: Name-based UUID (MD5) - v4: Random UUID - v5: Name-based UUID (SHA1) - v6: Time-based, lexically sortable UUID - v7: Unix time-based, lexically sortable UUID - v8: Custom UUID - squuid: Sequential UUID (non-standard)
(< _)(< x y)(< x y & more)Compare two or more UUIDs for < relation.
Compare two or more UUIDs for < relation.
(= _)(= x y)(= x y & more)Compare two or more UUIDs for equality.
Compare two or more UUIDs for equality.
(> _)(> x y)(> x y & more)Compare two or more UUIDs for > relation.
Compare two or more UUIDs for > relation.
(as-byte-array x)Extract a byte serialization that represents the 'name' of x.
Extract a byte serialization that represents the 'name' of x.
(as-uuid x)Coerce the value 'x' to a UUID.
Coerce the value 'x' to a UUID.
(get-clk-high uuid)Return the high 6 bits of the clock sequence.
Return the high 6 bits of the clock sequence.
(get-clk-low uuid)Return the low 8 bits of the clock sequence.
Return the low 8 bits of the clock sequence.
(get-clk-seq uuid)Return the clock-sequence number for v1/v6 UUIDs. Returns nil for other versions.
Return the clock-sequence number for v1/v6 UUIDs. Returns nil for other versions.
(get-instant uuid)Return a java.util.Date object for time-based UUIDs (v1, v6, v7). Returns nil for non-time-based UUIDs.
Return a java.util.Date object for time-based UUIDs (v1, v6, v7). Returns nil for non-time-based UUIDs.
(get-node-id uuid)Return the 48-bit node identifier.
Return the 48-bit node identifier.
(get-time-high uuid)Return the time_high field (12 bits) of UUID.
Return the time_high field (12 bits) of UUID.
(get-time-low uuid)Return the time_low field (32 bits) of UUID.
Return the time_low field (32 bits) of UUID.
(get-time-mid uuid)Return the time_mid field (16 bits) of UUID.
Return the time_mid field (16 bits) of UUID.
(get-timestamp uuid)Return the timestamp associated with time-based UUIDs (v1, v6, v7). Returns nil for non-time-based UUIDs.
Return the timestamp associated with time-based UUIDs (v1, v6, v7). Returns nil for non-time-based UUIDs.
(get-unix-time uuid)Return the unix time (milliseconds since epoch) for time-based UUIDs. Returns nil for non-time-based UUIDs.
Return the unix time (milliseconds since epoch) for time-based UUIDs. Returns nil for non-time-based UUIDs.
(get-variant uuid)Return the variant number associated with this UUID.
Return the variant number associated with this UUID.
(get-version uuid)Return the version number associated with this UUID.
Return the version number associated with this UUID.
(get-word-high uuid)Return the high 64 bits (most significant word) of UUID.
Return the high 64 bits (most significant word) of UUID.
(get-word-low uuid)Return the low 64 bits (least significant word) of UUID.
Return the low 64 bits (least significant word) of UUID.
(max)Generates the v15 (maximum) UUID: ffffffff-ffff-ffff-ffff-ffffffffffff
Generates the v15 (maximum) UUID: ffffffff-ffff-ffff-ffff-ffffffffffff
(max? uuid)Return true if UUID has all 128 bits set.
Return true if UUID has all 128 bits set.
(monotonic-time)Return a monotonic timestamp based on Gregorian calendar.
Return a monotonic timestamp based on Gregorian calendar.
(null)Generates the v0 (null) UUID: 00000000-0000-0000-0000-000000000000
Generates the v0 (null) UUID: 00000000-0000-0000-0000-000000000000
(null? uuid)Return true if UUID has all 128 bits set to zero.
Return true if UUID has all 128 bits set to zero.
(squuid)Generate a SQUUID (sequential, random) unique identifier. Non-standard variation on v4 that increases sequentially over time.
Generate a SQUUID (sequential, random) unique identifier. Non-standard variation on v4 that increases sequentially over time.
(to-byte-array uuid)Return an array of 16 bytes that represents the UUID.
Return an array of 16 bytes that represents the UUID.
(to-hex-string uuid)Return a 32-character hex string (no dashes).
Return a 32-character hex string (no dashes).
(to-string uuid)Return a string representation of the UUID in canonical format.
Return a string representation of the UUID in canonical format.
(to-uri uuid)Return the unique URN URI associated with this UUID.
Return the unique URN URI associated with this UUID.
(to-urn-string uuid)Return a URN string representation.
Return a URN string representation.
(uuid-string? s)Return true if str is a valid UUID string.
Return true if str is a valid UUID string.
(uuid-urn-string? s)Return true if str is a valid UUID URN string.
Return true if str is a valid UUID URN string.
(uuid< x y)Compare two UUIDs for < relation.
Compare two UUIDs for < relation.
(uuid= x y)Compare two UUIDs for equality.
Compare two UUIDs for equality.
(uuid> x y)Compare two UUIDs for > relation.
Compare two UUIDs for > relation.
(uuidable? x)Return true if 'x' can be coerced to UUID.
Return true if 'x' can be coerced to UUID.
(v0)Generates the v0 (null) UUID: 00000000-0000-0000-0000-000000000000
Generates the v0 (null) UUID: 00000000-0000-0000-0000-000000000000
(v1)Generate a v1 (time-based) unique identifier, guaranteed to be unique and thread-safe regardless of clock precision or degree of concurrency.
Generate a v1 (time-based) unique identifier, guaranteed to be unique and thread-safe regardless of clock precision or degree of concurrency.
(v3 context local-part)Generate a v3 (name based, MD5 hash) UUID.
Args:
Generate a v3 (name based, MD5 hash) UUID. Args: - context: A UUIDable context (namespace) - local-part: The name to hash within the namespace
(v4)(v4 msb lsb)Generate a v4 (random) UUID.
With no arguments, uses default JVM implementation. With two long arguments (msb, lsb), constructs a valid v4 UUID from those values.
Generate a v4 (random) UUID. With no arguments, uses default JVM implementation. With two long arguments (msb, lsb), constructs a valid v4 UUID from those values.
(v5 context local-part)Generate a v5 (name based, SHA1 hash) UUID.
Args:
Generate a v5 (name based, SHA1 hash) UUID. Args: - context: A UUIDable context (namespace) - local-part: The name to hash within the namespace
(v6)Generate a v6 (time-based), lexically sortable, unique identifier. v6 is a field-compatible version of v1, reordered for improved DB locality.
Generate a v6 (time-based), lexically sortable, unique identifier. v6 is a field-compatible version of v1, reordered for improved DB locality.
(v7)Generate a v7 unix time-based, lexically sortable UUID with monotonic counter and cryptographically secure random portion.
Generate a v7 unix time-based, lexically sortable UUID with monotonic counter and cryptographically secure random portion.
(v8 msb lsb)Generate a v8 custom UUID with up to 122 bits of user data.
Args:
Generate a v8 custom UUID with up to 122 bits of user data. Args: - msb: Most significant 64 bits - lsb: Least significant 64 bits
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |