why update/delete need the 'select' statement to not be empty??
will throw an error:
Question 2: Does select: {} improve query performance?
3 Replies
You selected to wait for the human sages. They'll share their wisdom soon.
Grab some tea while you wait, or check out
#ask-ai
if you'd like a quick chat with the bot anyway!Hi @K1|ller
At the moment, Prisma requires at least one field to be selected when performing update or delete operations. This is a known issue and we have an improvement request here.
select: {}
does not improve query performance. To improve query performance, you would use select
to specify only the fields you need, which reduces the amount of data fetched from the database.GitHub
Issues · prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - Issues · prisma/prisma
thanks man and yeah I noticed it needs at least one field. WIll select: {} be available? when doing an update it would be great to not return anything