You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request/Clarification on Prisma2 functionalities #950
I'm currently creating an app that lets user connect to a particular database and read/extract info from the introspected columns. User should be able to select any/multiple columns from a table (from a DB) and then read the info.
Just facing some difficulties when automating the whole process to feed my GUI using Prisma2 and Photon API. Can you help with a few questions below ?
Is there a way to introspect "JUST" a particular table in a DB ? Because, if let say I have a large database, then introspecting and generating the data model will take a significant time for user..
Right now everytime I introspect a new DB, I have to copy the models or change the file name to "schema.prisma" before regenerating my Photon API. Is there a way to pass a flag to Prisma2 Introspection so that it use instead the generated datamodel file ? (to make the automation process more efficient).
If let say I have 100 different databases, must I have 100 different node module folders each containing Photon API for each of the DB ? Is there a way to make it simpler.
Is is possible to create general API in front of my "multiple" Photon APIs ? For example once I receive and API call from user, I have a general script that reads user info and points to the right Photon API and retrieve data accordingly ?
Sorry if its too long, but your thoughts/input are greatly appreciated. I'm kinda loving Prisma2 at the moment, great work guys !
Is there a way to introspect "JUST" a particular table in a DB ? Because, if let say I have a large database, then introspecting and generating the data model will take a significant time for user..
No, currently this is not possible. There is a workaround though in which you can use a user with limited permission. See #807
Right now everytime I introspect a new DB, I have to copy the models or change the file name to "schema.prisma" before regenerating my Photon API. Is there a way to pass a flag to Prisma2 Introspection so that it use instead the generated datamodel file ? (to make the automation process more efficient).
If let say I have 100 different databases, must I have 100 different node module folders each containing Photon API for each of the DB ? Is there a way to make it simpler.
Is is possible to create general API in front of my "multiple" Photon APIs ? For example once I receive and API call from user, I have a general script that reads user info and points to the right Photon API and retrieve data accordingly ?
Activity
pantharshit00 commentedon Nov 21, 2019
No, currently this is not possible. There is a workaround though in which you can use a user with limited permission. See #807
It is not possible right now. See prisma/specs#282
You can specify the path to generate photon in the schema file(https://github.com/prisma/prisma2/blob/master/docs/prisma-schema-file.md#generators-optional). If you have different databases so types for them will also be different so you do need those files.
You are talking about a multi tenent setup. Photon is not a good fit for that right now. Actually you can use Prisma 1 here. Here is a post about that: https://medium.zenika.com/building-a-multi-tenant-application-with-prisma-11bf890304d6
shah05 commentedon Nov 27, 2019
Thanks for your feedback and comment.
BjoernRave commentedon Dec 11, 2019
@shah05 @Errorname is (hopefully soon :D) working on a rework of his multi tenancy lib for prisma: Errorname/prisma-multi-tenant#5
TML-3008: differ pairs siblings by (nodeKind, id) — delete the role-s…
tml-2870: author RLS policies for every operation, and verify declare…
TML-2883: TS RLS policy authoring with PSL-identical wire names (#959)
chore(postgres-rls): close out the project — promote ADRs, delete pro…
TML-2503: close out the Supabase integration — promote the decision l…