Can I access a database, which was created with prisma, with a normal sql driver?
I can connect to my database using sqlx in rust and fetch data, but when I try to insert data I'm getting an error
My schema looks like this:
5 Replies
Hey @dxkyy 👋
Can I access a database, which was created with prismaWhen you say the database was created by Prisma, do you mean you were using Prisma Postgres? https://www.prisma.io/postgres
Prisma
Prisma Postgres | Instant Global Databases
Free to start, no setup, no commitments. Easily grow your database as your app scales.
Oh, no i created it using the prisma client in a typescript project
but i also need to access the same database in a rust project, and
prisma-client-rust
is not an option for meAh, okay!
Ideally yes, you should be able to connect to the database with other sql driver.
If I understand correctly, while using the database in rust project - you are able to query data but not insert data?
yes, exactly
this is the code thats causing problems:
i think it has something to do with the relations, how do I fix that?
I am not sure if this is a prisma related issue. I haven't used sqlx so I am not sure how to fix this.
Does a normal insert without relations work?