You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I map the type of a specific column to a custom type?
The doc explains how column postgres types can be mapped to specific JS types, but i was looking at setting up mappings at column level.
As an example, let's say I have a table users
id
status
1
active
2
inactive
And a table orders
id
status
1
dispatched
2
cancelled
And i would like to map users.status and orders.status to two custom TypeScript types. These may look like enums but the problem is more generic and could be any type.
The text was updated successfully, but these errors were encountered:
How can I map the type of a specific column to a custom type?
The doc explains how column postgres types can be mapped to specific JS types, but i was looking at setting up mappings at column level.
As an example, let's say I have a table
users
And a table
orders
And i would like to map
users.status
andorders.status
to two custom TypeScript types. These may look like enums but the problem is more generic and could be any type.The text was updated successfully, but these errors were encountered: