despairge
despairge
PPrisma
Created by despairge on 10/2/2024 in #help-and-questions
How to do operations on multiple columns
Hi, let's say I have the following table structure: A | B | C which are all ints I would like to be able to find all rows such that a*a + b - 30 = c I assume I would start like this:
prisma.table.findMany({
c: {equals: prisma.table.fields.a * prisma.table.fields.a + prisma.table.fields.b - 30}
})
prisma.table.findMany({
c: {equals: prisma.table.fields.a * prisma.table.fields.a + prisma.table.fields.b - 30}
})
Obviously the syntax for this does not work, so I am wondering if I am going about this the right way and also if this is even possible in prisma or if I have to do a rawsql query.
2 replies