Skip to content

Commit 832cd89

Browse files
update readme
1 parent 435b4d0 commit 832cd89

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@
77

88
UUIDv7 for Elixir and (optionally) Ecto, using an 18-bit randomly-seeded counter.
99

10-
There are other UUID v7 packages, but I wanted the additional precision.
11-
12-
Uses suggestions described in **[Section 6.2](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-monotonicity-and-counters)**
13-
from [this IETF Draft](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html)
10+
Uses suggestions described in **[Section 6.2](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-monotonicity-and-counters)** from [this IETF Draft](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html)
1411
to add additional sort precision to a version 7 UUID.
1512

13+
## When should I use this package?
14+
15+
- You want sequential, time-based, ordered IDs (per-node).
16+
- You are willing to trade a small amount of raw performance for these
17+
guarantees. You are taking a hit for backwards time-leap protection and the
18+
counter with rollover protection.
19+
20+
## When should I not use this package?
21+
22+
- You don't care about sort/order precision beyond milliseconds.
23+
24+
There are other UUID packages, that only have millisecond precision, for example:
25+
26+
- [martinthenth/uuidv7](https://github.com/martinthenth/uuidv7)
27+
- [bitwalker/uniq](https://github.com/bitwalker/uniq)
28+
1629
## Installation
1730

1831
The package can be installed by adding `uuid_v7` to your list of dependencies in `mix.exs`:

0 commit comments

Comments
 (0)