-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate columnTypes as const rather than Record
This changes the '$Types' object generation to generate `as const` objects rather than `Record`. Using `as const` allows the type system itself to know the types of columns statically, which it previously could not infer because the specific values were lost due to the generic `Record` use. This is a necessary change to enable the JSON column schema parsing to only allow callers to specify schemas for JSON/JSONB columns. It's also just better, I think, but I was unaware of it at the time the feature was originally written.
- Loading branch information
Showing
3 changed files
with
49 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters