Skip to content

Add support for ENUMs for cockroachdb #8039

@rafiss

Description

@rafiss

Feature Description

CockroachDB supports enums very similarly to how Postgres does. The TypeORM driver for CockroachDB should recognize that.

The Problem

Currently, TypeORM does not recognize enum as a supported type for CockroachDB, so this feature is not available to users.

The Solution

Support enums for CockroachDB just as they are for Postgres. See 43e52c5 for initial PG enum support as well as the current code.

Considered Alternatives

Use string constants,

Additional Context

This was requested on the cockroachdb repo here: cockroachdb/cockroach#68368

Relevant Database Driver(s)

DB Type Relevant
aurora-data-api no
aurora-data-api-pg no
better-sqlite3 no
cockroachdb yes
cordova no
expo no
mongodb no
mysql no
nativescript no
oracle no
postgres no
react-native no
sap no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✖️ Yes, I have the time, and I know how to start.
  • ✅ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions