# `StatifierPersistence.Ecto.KeyGenerator.UXID`
[🔗](https://github.com/riddler/statifier_persistence/blob/v0.18.0/lib/statifier_persistence/ecto/key_generator/uxid.ex#L1)

The default key generator: k-sortable UXID strings (ADR-0002 decision 2).

Keys are generated by the `uxid` package and carry per-table prefixes in
the engine's own style - `chart_`, `pos_`, `exec_`, `input_` (ADR-0002
decision 4, as amended; the fourth arrived with ADR-0010's input log) -
so a key met in a psql console or a log line names its table. Stored as `:string` fields over `:text` columns.

Options given to the generator (via `{module, opts}` or the resolved
default) are passed through to `UXID.generate!/1`; the per-table
`:prefix` is supplied unless the options already carry one.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
