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

SQL suggestions to raw queries

Open arthurfiorette opened this issue 2 years ago • 0 comments

Problem

Transferred from https://github.com/prisma/language-tools/issues/1219#issuecomment-1422667749

Its easy to write a wrong model name or have similar problems even with SQL syntax highlighting. If we could autocomplete and suggest model names, field names and all informations that a prisma schema can have, would be awesome!

Suggested solution

prisma.model.$executeRaw`
  UPDATE ${ctrl space -> shows prisma model names}
  SET ${ctrl space -> show fields}
  WHERE ${ctrl space -> show fields}
`

It would be even better if to show a warning if I write a invalid model/field name.

arthurfiorette avatar Feb 08 '23 15:02 arthurfiorette