Add support for views
toxsick opened this issue · 4 comments
toxsick commented
Hey there,
prisma recently add experimental support for views:
https://www.prisma.io/docs/concepts/components/prisma-schema/views
Could this be supported? Currently printSchema
will remove views.
Big thanks and regards!
MrLeebo commented
@toxsick interesting request. I can see it working by basically parsing views in the same way as models. The builder would have a new .view()
helper, e.g.
builder.view("UserInfo").field('value', 'Json')
creates
view UserInfo {
value Json
}
Does that sound correct to you?
toxsick commented
Hey @MrLeebo, that sounds super correct and would be nice to have!
Thanks a lot and have a nice weekend!
MrLeebo commented