# \#uniqueness

**URL:** https://forum.elixirforum.com/tag/uniqueness/2025.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Once - Ecto type for globally unique 64-bits IDs generated by multiple Elixir nodes](https://forum.elixirforum.com/t/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571)

<div class="topic-metadata">

**Author:** [@jsm](https://forum.elixirforum.com/u/jsm)\
**Replies:** 16\
**Last updated:** [August 19, 2026, 6:58pm UTC](https://forum.elixirforum.com/t/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571 "2026-08-19T18:58:39Z")

</div>

Once is an Ecto type for locally unique (unique within your domain or application) 64-bit IDs generated by multiple Elixir nodes. Locally unique IDs make it easier to keep things separated, simplify caching and simplify …

---

## [NoNoncense - generate globally unique nonces in distributed Elixir](https://forum.elixirforum.com/t/nononcense-generate-globally-unique-nonces-in-distributed-elixir/68551)

<div class="topic-metadata">

**Author:** [@jsm](https://forum.elixirforum.com/u/jsm)\
**Replies:** 4\
**Last updated:** [August 19, 2026, 6:57pm UTC](https://forum.elixirforum.com/t/nononcense-generate-globally-unique-nonces-in-distributed-elixir/68551 "2026-08-19T18:57:46Z")

</div>

Generate globally unique nonces (number-only-used-once) in distributed Elixir. These nonces are used to form the basis of an upcoming GUID generation package unique ID package Once, or in crypto operations that require n…

---

## [Enforce uniqueness on null](https://forum.elixirforum.com/t/enforce-uniqueness-on-null/49392)

<div class="topic-metadata">

**Author:** [@IVOguy](https://forum.elixirforum.com/u/IVOguy)\
**Replies:** 2\
**Last updated:** [August 6, 2022, 9:30pm UTC](https://forum.elixirforum.com/t/enforce-uniqueness-on-null/49392 "2022-08-06T21:30:20Z")

</div>

I have a set of Events, that have a date. The dates are only given in full days (ie 2022-08-06). To keep track of the order of Events within one day, I keep a previous\_event\_id key for each event so that I can create a l…

---

## [Commanded.Middleware.Uniqueness: a middleware for the Commanded CQRS/ES framework](https://forum.elixirforum.com/t/commanded-middleware-uniqueness-a-middleware-for-the-commanded-cqrs-es-framework/27152)

<div class="topic-metadata">

**Author:** [@heathen](https://forum.elixirforum.com/u/heathen)\
**Replies:** 1\
**Last updated:** [April 11, 2020, 2:18pm UTC](https://forum.elixirforum.com/t/commanded-middleware-uniqueness-a-middleware-for-the-commanded-cqrs-es-framework/27152 "2020-04-11T14:18:16Z")

</div>

Commanded.Middleware.Uniqueness is a Commanded middleware for checking certain values uniqueness during commands dispatch. Might be useful as a short-term unique values cache before subsequent events persisted and projec…
