[Introspection] Crashes when default value contains line breaks
See original GitHub issueI’ve observed the Prisma 2 introspection code crash when a default value is not a constant, but some expression, in my case also containing a new line.
Consider a column in postgres with the following default value:
'Concatenated'||E'\n';
Introspection crashes with:
Schema parsing
error: Unexpected token. Expected one of:
--> schema.prisma:389
|
388 | columnName String @default("(Concatenated ||
389 | )")
| ^ Unexpected token.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Reflection to get default value of parameter - Stack Overflow
You are trying to get the value by providing a KClass instead of the actual instance. This is a working solution based on...
Read more >Build settings reference | Apple Developer Documentation
A detailed list of individual Xcode build settings that control or change the way a target is built.
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
Integer is used on 64-bit machines and string is used on 32-bit machines. Default Values. When a message is parsed, if the encoded...
Read more >Reflection 14.0 Service Pack 7 (SP7): Fixes, Features, and ...
Reflection for UNIX and OpenVMS (includes Reflection for ReGIS ... Default values can now be saved to the user's configuration file.
Read more >FlatBuffers: Use in C++ - Google
This page assumes you have written a FlatBuffers schema and compiled it with ... shared (on a field): For string fields, this enables...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
lol no - just a comment that the default value is missing here because %explanation+link%
Suggestion:
Just don’t spend any time trying to print a multi-line, commented-out default value. No mess like this: