-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use native DB type in injected auth models if user uses it #2243
Conversation
Signed-off-by: Mihovil Ilakovac <[email protected]>
aafbb7a
to
d08e324
Compare
d08e324
to
048d804
Compare
waspc/src/Wasp/Psl/Ast/Attribute.hs
Outdated
|
||
-- | @db.Uuid or @db.String or @db.VarChar are examples of native db types. | ||
isNativeDbTypeAttr :: Attribute -> Bool | ||
isNativeDbTypeAttr = isPrefixOf "db." . _attrName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNativeDbTypeAttr = isPrefixOf "db." . _attrName | |
isNativeDbTypeAttr = ("db." `isPrefixOf`) . _attrName |
reads nicer :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@infomiho nice stuff! I approved it, but check the comment about possibly making the test more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of AST here which is a bit hard to read / maintain -> any way we might be able to replace it with actual PSL, here in the test? That is parsed either during test runtime, or even test compile time if that is doable (although I think I remember we had hard time with that).
If not, never mind, but if yes, I think it could make the test easier to read and maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is parsed either during test runtime
I've done this bit since it was similar to something we already did with the full schema file.
wasp/waspc/test/Util/Prisma.hs
Line 10 in 362ccff
getPrismaSchema :: T.Text -> Psl.Schema.Schema |
Closes #2167