Current section
Files
Jump to
Current section
Files
CHANGELOG.md
# Changelog
## 0.3.0
### Added
* `UUIDv7.bingenerate_many/1` and `UUIDv7.generate_many/1` — bulk
generation of strictly-ordered UUIDv7 batches. Single
`:crypto.strong_rand_bytes/1` call per batch; up to ~30× faster
than calling `bingenerate/0` in a loop. The 12-bit sub-millisecond
field is partitioned into `n` slots with crypto-strong jitter
inside each slot. Batches of `n > 4096` auto-chunk across
consecutive milliseconds.
* `UUID` — a boxed-binary struct wrapping the raw 16 bytes of a UUID.
Version-agnostic. Implements `String.Chars`, `Inspect` (renders as
`UUID.new("...")` so the inspected form is valid Elixir without
needing an import), `JSON.Encoder` (Elixir 1.18+ built-in `JSON`),
and `Jason.Encoder` (auto-detected if `:jason` is in your deps).
* `UUIDv7.Boxed` — Ecto type that autogenerates `%UUID{}` values and
dumps the raw bytes directly to Postgres, skipping the
`hex → binary` round-trip that `Ecto.UUID` performs on every
insert. ~1.43× faster and ~24% less memory per row vs the hex
string path.
* `UUIDv7.Boxed.generate_many/1` — bulk variant returning `[%UUID{}]`.
* `UUIDv7.min_uuid/1` now accepts a `Date` (midnight UTC of that day)
in addition to `DateTime`.
* `UUIDv7.to_datetime/1` and `UUIDv7.to_date/1` — extract a UTC
`DateTime` (millisecond precision) or `Date` from a UUIDv7 hex
string or raw 16-byte binary.
### Changed
* Minimum Elixir version bumped to 1.18 (for built-in `JSON` module).
## 0.2.0
* `UUIDv7.generate_from_datetime/1`, `bingenerate_from_datetime/1`
* `UUIDv7.min_uuid/1` for half-closed time-range queries