Brendonovich / prisma-client-rust

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

Mixed Batch Container Types #237

Closed Brendonovich closed 1 year ago

Brendonovich commented 1 year ago

From #236:

I've been thinking about how batching multiple types of query containers at the same time could work, since Prisma Client JS allows you to batch whatever you want. In your example, something like _batch((tag::Create, Vec)) would do the trick, but at the moment you can only use either a tuple or a Vec as a batch container. Allowing this would require some extra work on my part, since I'd have to keep track of how many queries were provided to each tuple and Vec, receive the resulting data as one big Vec, and then partition the results back out to tuples and Vec of the appropriate size.