Skip to content

Replace Dialect and ExecutionType types as enums #43

@MasterOdin

Description

@MasterOdin

Right now we export the Dialect and ExecutionType as string union types. While this works, it would be better to use string enums like:

enum ExecutionType {
  LISTING = 'LISTING',
  MODIFICATION = 'MODIFICATION',
  UNKNOWN = 'UNKNOWN',
};

where we can retain the same type signature where we use ExecutionType currently, but also allow downstream consumers to do stuff like getExecutionType('SELECT') === ExecutionType.LISTING as opposed to getExecutionType('SELECT') === 'LISTING' leading to better type safety.

As this is a BC breaking change, this will need to land in 3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions