Guide

For people using TNIDs in an application.

Why TNIDs

Backwards compatible with UUIDs: every TNID is one.

Where to go

TNID is a draft (version 0); libraries are pre-1.0.

  1. 01 What a TNID isA TNID is a 128-bit ID that carries a short name saying what kind of thing it identifies, and is backwards compatible with UUIDs.
  2. 02 Basic operationsThe four things every TNID library does: define a type per name, generate, show and store, and parse.
  3. 03 NamesThe rules for TNID names, and how to choose names that stay readable and stable.
  4. 04 Choosing a variantWhen to use TNIDv0 (time-sortable), when to use TNIDv1 (random), and how to combine them.
  5. 05 Type safetyHow TNID names become part of a TNID's type, so passing the wrong kind of TNID is a compile error.
  6. 06 Storing and showing TNIDsThe forms a TNID can be written in, and a practical default: store it in UUID form, show it as a TNID string.
  7. 07 Hiding creation time and unwanted wordsHow the optional encryption and blocklist filtering extensions hide TNIDv0 timestamps and keep unwanted words out of TNIDs.
  8. 08 Using TNIDs where UUIDs are expectedWhat stays the same and what is different when TNIDs go into columns, APIs and tools built for UUIDs.
  9. 09 Compared with other IDsHow TNIDs compare with UUIDv4, UUIDv7, ULID, KSUID, TypeID, and prefixed UUID strings, and when to use another ID format instead.