Prepared Statements and Tagged templates
See original GitHub issueIt would be really cool if you supported tagged templates for prepared statements instead of @param syntax. It’s more modern and easier to work with in newer versions of node.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Generating SQL prepared statements with Javascript tagged ...
I have put together some code to generate SQL prepared statements const sql = (string, ...values) => { const isQuery = query =>...
Read more >Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, ... However, a tagged template literal may not result in a string; ...
Read more >Tagged - npm.io
Tagged Packages ; common-tags. a few common utility template tags for ES2015. array ; sql-template-strings. ES6 tagged template strings for prepared statements ......
Read more >8. Template literals - Exploring JS
Escaping in tagged template literals: cooked versus raw; 8.4.3. Example: String.raw; 8.4.4. Example: implementing a tag function for HTML templating; 8.4.5.
Read more >keywords:tagged template - npm search
ES6 tagged template strings for prepared statements with mysql and postgres ... a few common utility template tags for ES2015.
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

this was implemented some time ago
That could work for making the statement, but it would not give you a “safe easy default” where using a prepared statement is the easiest way to run your code and even people who are not very informed don’t run into SQL Injection