So here’s another one, pretty internal to Prisma I...
# orm-help
p
So here’s another one, pretty internal to Prisma I would assume: if I provide a Prisma query with an empty object in the
arg
(for example:
where: { }
) would that affect efficiency in some way? In other words, should I bother to use short-circuit and spread operators to eliminate the above or does Prisma deal with it already? @nilan would probably have a good answer tomorrow 🙂
we run
input.map
over all filter conditions. There are none in your case, so it's very minimal overhead
p
Thank you! Is that mapping over a JavaScript object using
Object.keys
?
n
that's Scala code
p
Sorry, my statement was missing the word “like”: is that like mapping...
n
no, the code at this point is given a map of filter conditions already
you can draw a comparison to mapping over object keys in JS if you want, but
Map
is an actual datastructure in Scala
p
Ok, it’s clear.
👍 1
n
yup! 🙂 Basically we map over an empty map, and nothing else happens.
p
Thank you, then I won’t give myself a headache in removing the empty
where
:-)
👍 1