language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Quick-fixes for Prisma Client API raw functions

Open carmenberndt opened this issue 5 years ago • 3 comments

We should have quick fixes for

  • executeRaw(sql, params) and queryRaw(sql, params)
  • or
  • executeRaw`sql` 
    
  • and
  • queryRaw`sql`
    
  • for queryRaw(sql) and executeRaw(sql).

This is only possible if the extension is activated not only for .prisma files.

carmenberndt avatar Jun 26 '20 12:06 carmenberndt

What exactly should the quick fix do here @carmenberndt, do you remember maybe? Replacing ( with backticks and such?

janpio avatar Nov 24 '21 14:11 janpio

@janpio Not quite, here's the link to the internal discussion: https://prisma-company.slack.com/archives/C5Z9TH6N9/p1593174137040600?thread_ts=1593166055.039500&channel=C5Z9TH6N9&message_ts=1593174137.040600

carmenberndt avatar Nov 24 '21 15:11 carmenberndt

Thanks for that link.

I guess we need to update that now somehow that we split the safe and unsafe functions into separate functions - see https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access. Not sure how that would affect any Quick Fixes or what those would look like based on this.

janpio avatar Nov 24 '21 16:11 janpio