Skip to content

docs: document the simple-enum column type - #12981

Merged
alumni merged 1 commit into
typeorm:masterfrom
SssiiiSssii1:docs/simple-enum-column-type
Oct 20, 2026
Merged

alumni merged 1 commit into
typeorm:masterfrom
SssiiiSssii1:docs/simple-enum-column-type

Conversation

@SssiiiSssii1

Copy link
Copy Markdown
Contributor

Description of change

simple-enum has existed since #3700 but was never documented — it only appeared in a 1.0 release note. This adds a section to the entity docs next to the existing simple-array and simple-json sections.

The new section covers:

  • what simple-enum is and why it exists (portable enum storage without relying on a database-native enum type)
  • usage with a TypeScript enum class and with an array of literal values
  • support for string, numeric and heterogeneous enums, and numeric values being converted back on load
  • how each driver stores the values: native enum on MySQL/MariaDB/Aurora MySQL and PostgreSQL/CockroachDB/Aurora PostgreSQL, string column plus CHECK constraint on the SQLite family and SQL Server, plain nvarchar on SAP HANA
  • that Oracle and Spanner do not support it
  • array: true support on PostgreSQL, CockroachDB and SQLite, including the comma-separated SQLite storage and the absence of a CHECK constraint for arrays

Verified by building the docs site locally (cd docs && pnpm install --ignore-workspace && pnpm run build) — the build succeeds and the new section renders with its own anchor. Prettier passes on the changed file.

No tests: this is a documentation-only change.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links a relevant issue using a closing keyword: Closes #10077
  • There are new or updated tests validating the change — N/A, documentation only
  • Documentation has been updated to reflect this change (docs/docs/**.md)

Add a simple-enum section next to simple-array and simple-json, covering enum
class and literal-union usage, supported drivers and their storage, and
array support.

Closes typeorm#10077
@github-actions github-actions Bot added the linked-issue PR references an issue label Oct 19, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review
  • Author self-review: I have reviewed the code review findings, and addressed the relevant ones.

Grey Divider

Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@SssiiiSssii1
SssiiiSssii1 requested a review from Cprakhar October 20, 2026 10:07
@alumni
alumni merged commit 7276b6d into typeorm:master Oct 20, 2026
14 checks passed
@github-actions github-actions Bot added this to the 2.0.next milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linked-issue PR references an issue

Development

Successfully merging this pull request may close these issues.

3 participants