Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
2 replies
Romain

Rewriting all mongodb queries ?

I am using the t3 stack to create a dashboard on an existing project. The data comes from mongodb and there are already a lot of aggregation pipeline written for python.

But using prisma with mongodb, I cannot use these pipelines because the groupby for instance is incompatible with aggregates. I need to use groupBy() from prisma. Does this imply I have to rewritte all the queries only for that project ? (because only prisma use that)

If there is no way to use the normal aggregation pipelines of mongodb with prisma, can someon explain me why did they make it like that ?
Prisma
Use Prisma Client to aggregate, group by, count, and select distinct.
Aggregation, grouping, and summarizing (Concepts)
Was this page helpful?