Closed merlindru closed 11 months ago
Nested queries could be simplified using a where! macro that automatically nests ::is calls
where!
::is
In JavaScript:
db.transcript.findFirst({ where: { id: transcriptId, project: { team: { members: { some: { id: userId } } }, }, } });
Currently in prisma-client-rust:
db.transcript().find_first(vec![ transcript::id::equals(self.transcript_id), transcript::project::is(vec![ project::team::is(vec![ team::members::some(vec![ user::id::equals(user_id), ]) ]) ]), ]);
Proposed:
db.transcript().find_first(transcript::where! { id: self.transcript_id, project: { team: { members: { some: { id: user_id } } } } });
Nested queries could be simplified using a
where!
macro that automatically nests::is
callsIn JavaScript:
Currently in prisma-client-rust:
Proposed: