Repository navigation
TML-3501: The enum docs say members are written values that compare by their data type - #30798
Merged
Merged
Conversation
…d keepsWrittenForm keeps the codec type ADR 157 example writes int8 members unquoted, as the cast rule now requires. ADR 157, ADR 244, ADR 254 and the Data Contract and Contract Emitter subsystem docs now say how enum members are read from PSL, how equalityKey decides membership, and how keepsWrittenForm types enum fields. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…SL codes for each enum refusal Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Contributor
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
Contributor
size-limit report 📦
|
wmadden
approved these changes
Oct 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs only. This brings the enum docs in line with the code after #30790, which made enum members values of their data type.
One example from ADR 157 shows the change. It was written with quoted members on an integer codec:
Since #30790,
Low = "1"is refused withPSL_VALUE_TYPE_INCOMPATIBLE, becausepg/int8has no cast from text. The example now writesLow = 1andHigh = 10. The stored contract and the CHECK are unchanged.What changed
has(),nameOf()andordinalOf()find a value equal to a member by its data type'sequalityKey, so0.50is thepg/numericmember0.5.keepsWrittenFormkeeps the codec's type for the enum's members and columns.INlist compares members in the column's type, so a numeric column admits0.50for the member0.5.How it was checked
pnpm lint:docspasses.Found while checking
For a SQL enum member that is neither a string nor a finite number, PSL throws
CONTRACT.ENUM_INVALIDwith no source position, instead of a diagnostic at the member. ADR 157 now says so. The code fix is TML-3653.Agent: pimpernel-41
🤖 Generated with Claude Code
Summary by CodeRabbit
NaNin list containment expressions.