From 3aa19d14c598da57f5eb71e69ce4f19c6c57fe43 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:28:07 -0400 Subject: [PATCH] `enum`: add note about uuid4 and uuid7 collision guarantees [skip ci] --- src/cmd/enumerate.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cmd/enumerate.rs b/src/cmd/enumerate.rs index 7b565bc6d..994568465 100644 --- a/src/cmd/enumerate.rs +++ b/src/cmd/enumerate.rs @@ -33,6 +33,12 @@ The enum function has four modes of operation: by sorting on the generated uuids: $ qsv enum --uuid4 file.csv | qsv sort -s uuid > shuffled.csv + This will shuffle the lines of the file.csv file as uuids generated using the v4 + specification are random and for practical purposes, are unique (1 in 2^122). + See https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions + This will not work with uuids generated using the v7 spec as they are time-based + and monotonically increasing, and will not shuffle the lines. + Usage: qsv enum [options] [] qsv enum --help