valtyr/prisma-kysely

[feature] prisma dialect

Closed this issue · 3 comments

We've been investigating the possibility of actually leveraging kysely but actually utilizing prisma as the dialect for the connection (since the connection is actually handled via rust). The overall concept itself is rather simple, and we should be able to just drive everything off of the PrismaClient.

You can see how this is done via other dialects such as: https://github.com/igalklebanov/kysely-postgres-js which is using a javascript library for postgres connections and as such could be done in a similar fashion.

From there, it could be as simple as running $queryRawUnsafe and $executeRawUnsafe assuming that the kysely system handles the escaping itself otherwise using $queryRaw and $executeRaw if it is not.

Hey there @mwillbanks, I've already prototyped this but haven't yet had the time to complete it. This is definitely something this library will support in the future.

@valtyr awesome to hear, if you might be willing to share a branch of the prototype, it might be something that we could help with but likewise understand if it's fully conceptual at the moment.