-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Experimental] Support for prisma #1220
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexis Rico <[email protected]>
|
size-limit report 📦
|
Signed-off-by: Alexis Rico <[email protected]>
Your pull request has been published to npm. You can install @xata.io/client by running:
Other packages are published like this:
To test the CLI, run:
[Pull request has been updated, please wait for latest changes to be pushed to npm...] |
Signed-off-by: Alexis Rico <[email protected]>
👋 Heyho from Prisma. If you want, you can do a temporary PR similar to prisma/prisma-engines#4342, which should make it simpler to run the Prisma test suites against the driver adapter. We are unfortunately not ready yet with a more general approach for that, but I am happy to work with getting that run in this temporary way. (Unless of course you have figured out a better way already) |
Hey @janpio! We indeed want to move our adapter to prisma-engines, I actually took a heavy inspiration from the existing ones when building the first version. We are currently working on polishing some parts of our postgres connector internally, and we would like to finish that before moving the code to your side. (For example, right now we are injecting to the adapter the schema, but we want to forward the postgres row metadata via the http adapter, in order that joins and projections fully work). Happy to connect via email or GitHub if you have any suggestions 😉 |
Actually, the driver living in your repo is the right spot - but temporarily (via a PR) having a copy in our test setup can be useful for you I think. But we are currently also moving things around (soon the driver adapters live in How do you think about transactions? As far I know your client does not support that yet. Many Prisma Client queries use transactions under the hood (at least as soon as the queries become a tiny bit complex). Would you want those to be not working, or are you ok skipping the transaction guarantees for your users? |
We are working to offer full postgres compatibility, including transactions in the near future. We will even expose a TCP wire protocol connection string and likely have two adapters HTTP and wire protocol. But all of that is blocked until we ship the full thing. |
const [columnNames, columnTypes] = Object.fromEntries(columns as any).reduce( | ||
([names, types]: [string[], ColumnType[]], [name, { type_name }]: [string, { type_name: string }]) => { | ||
names.push(name); | ||
types.push(fieldToColumnType(type_name)); | ||
return [names, types]; | ||
}, | ||
[[], []] as [string[], ColumnType[]] | ||
); |
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.
TODO: Improve this
TODO: