Brendonovich / prisma-client-rust

Type-safe database access for Rust
https://prisma.brendonovich.dev
Apache License 2.0
1.76k stars 104 forks source link

Struct PrismaClient: derive Clone #304

Closed onlycs closed 1 year ago

onlycs commented 1 year ago

It doesn't conflict with any properties...

Brendonovich commented 1 year ago

The problem with this is that the performance of PrismaClient::clone would be worse and more unpredictable than Arc<PrismaClient>::clone. In future I may add more internals to the client with more stuff that needs cloning. Cloning a single Arc in user-space is cheaper and more reliable, so I'm going to keep recommending that approach.