Skip to content

[Good First Issue] Strongly type Field.type as a FieldType union#209

Open
devthedevil wants to merge 1 commit into
planetscale:mainfrom
devthedevil:fix/strongly-type-field-type
Open

[Good First Issue] Strongly type Field.type as a FieldType union#209
devthedevil wants to merge 1 commit into
planetscale:mainfrom
devthedevil:fix/strongly-type-field-type

Conversation

@devthedevil

Copy link
Copy Markdown

Summary

Adds a FieldType union type covering all PlanetScale / Vitess column types and uses it for Field.type and the types map on ExecutedQuery.

Changes

  • Export new FieldType union sourced from vitessio/vitess go/sqltypes/type.go
  • Change Field.type from stringFieldType
  • Change type Types from Record<string, string>Record<string, FieldType>
  • The | (string & {}) fallback keeps the union open for future server-side types

Related Issue

Closes #141

Testing

Purely additive type-level change — no runtime behaviour changes. Verify with npm test.

@devthedevil devthedevil requested review from a team and mattrobenolt as code owners June 25, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strongly type "type" property of Field

1 participant