What's the most efficient way to count dynamic Int...
# orm-help
t
What's the most efficient way to count dynamic Int? Let's say I have 3 emojis "thumbsup", "thumbsdown", "unicorn" and I want to count the amount of emojis. I could write it like this:
Copy code
thumbsup   Int      @default(0)
thumbsdown Int      @default(0)
unicorn    Int      @default(0)
This would allow me to
Copy code
thumbsup: {increment: 1}
But what if I want to increase emojis to 100 - I would have to add 100 of these fields. Is there an alternative? I could use a JSON field
Copy code
emojis Json
but I read that JSON takes more space and there's currently no way to:
emojis[emojiName]: {increment: 1}
right?