This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch uuid7-format in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 894494f545c076ed7c729b9d9f2950b4f38811a2 Author: Robert Newson <[email protected]> AuthorDate: Mon Oct 13 10:17:04 2025 +0100 correct formatting of UUID v7 --- src/couch/src/couch_uuids.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/couch/src/couch_uuids.erl b/src/couch/src/couch_uuids.erl index f007eab91..988585285 100644 --- a/src/couch/src/couch_uuids.erl +++ b/src/couch/src/couch_uuids.erl @@ -110,7 +110,8 @@ v7_bin() -> <<MSec:48, 7:4, RandA:12, 2:2, RandB:62>>. v7_hex() -> - couch_util:to_hex_bin(v7_bin()). + <<A:8/binary, B:4/binary, C:4/binary, D:4/binary, E:12/binary>> = couch_util:to_hex_bin(v7_bin()), + <<A/binary, "-", B/binary, "-", C/binary, "-", D/binary, "-", E/binary>>. new_prefix() -> couch_util:to_hex((crypto:strong_rand_bytes(13))).
