1 Answer
- Newest
- Most votes
- Most comments
0
Amazon Timestream does not support parameterized queries natively, and the PrepareQuery API method is meant for query validation and not for storing or using prepared statements. You can use the following as a workaround and sanitize your inputs
import { escape } from 'mysql';
let userId = getUserInput();
let query = `SELECT * FROM users WHERE id = ${escape(userId)}`;
Relevant content
- asked 4 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 6 months ago