Add docs for .raw`` template literal API with parameters #1583
See original GitHub issueIt’s now possible to use parameters and they will be escaped.
const userId = 1
const result = await prisma.raw`SELECT * User WHERE id = ${userId};`
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Improve .raw`` template literal API with helpers #1749 - GitHub
Here we may want to add helpers, that could be helpful for raw nested queries. We need to discuss about if we should...
Read more >Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
Read more >Documentation - Template Literal Types - TypeScript
Generating mapping types which change properties via template literal strings.
Read more >21 Using template literals and tagged templates - Exploring JS
Before we dig into the two features template literal and tagged template, let's first examine the multiple meanings of the term template.
Read more >Understanding Template Literals in JavaScript - DigitalOcean
Template literals are a new form of making strings… ... on this argument at strings.raw , which contains the strings without any escape ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Seems like this was already documented: https://github.com/prisma/prisma2/blob/master/docs/prisma-client-js/api.md#setting-variables 👍
@nikolasburk it is 😃 https://github.com/prisma/prisma-client-js/pull/522