Thanks to @bill karvin comment There is no support
https://github.com/prisma/prisma/issues/6336
Answer from Bernardao on Stack Overflowmysql - How to create computed/calculated field in Prisma? - Stack Overflow
How to add a column of computed fields and filter by that column
Help creating computed fields
Is it possible to use Prisma ORM computed fields for filtering?
Hey, I've been researching about this but don't know if this is possible. I have a table with a firstName and lastName fields and I want to get the full name. That seems possible with a computed field. But I also want to filter based on this, for example, using { fullName: { contains: 'something' } }. To my understanding, this wouldn't be possible with a computed field because it would only exist until a query is performed and there's available data, so you couldn't use it as a filter from the beginning. Anyways, I didn't manage to get the computed fields working on my PrismaService, it would keep telling me that I couldn't select fullName as a field to be retrieved in the query, but if using those fields for filtering is possible, then I would keep trying.
If not, what's the solution you would use? This is a pretty common case, so I'm surprised by not finding simple solutions that don't involve using raw queries to filter based on the full name.
Thanks in advance!