Skip to content

yggdrasil.data.types.id

id

DataTypeId

Bases: IntEnum

Stable numeric tag for every :class:DataType subclass.

The integer values are clustered by family so a plain sorted(DataTypeId) walk visits related types together — and so range-based property checks (is_integer / is_temporal / …) read as one inequality rather than a hand-maintained set. Placeholder gaps inside each family leave room for future additions (e.g. INT128, BFLOAT16, TIMETZ) without re-numbering anything else.

Layout:

  • 0–9 — sentinel / opaque (OBJECT, NULL).
  • 10–19 — boolean.
  • 20–39 — integer family (abstract INTEGER + sized signed INT8…INT64 + unsigned UINT8…UINT64).
  • 40–49 — floating-point family (abstract FLOAT + sized FLOAT16…FLOAT64).
  • 50–59 — decimal.
  • 60–69 — temporal (DATE / TIME / TIMESTAMP / DURATION).
  • 70–79 — bytes (BINARY / STRING).
  • 80–99 — extensions (DICTIONARY / ENUM / STR_ENUM / INT_ENUM / UNION / SJSON / BJSON).
  • 100+ — nested (ARRAY / MAP / STRUCT).