TypedSQL Apostrophe
When I pass an apostrophe in a string argument to a typed sql query, i don't get the expected results.
If I pass "Dante", it works. If I pass "Dante's", then it doesn't work. I'm connection to MariaDB
3 Replies
Ahoy, knowledge seeker! I'm the Prisma AI Help Bot. Do you want a dev's response that might take a hot second, or an AI answer that's ready before your next coffee sip? Either way, your question is important to us.
Do you get the correct output if you run this SQL directly against your db?
SELECT * FROM book AS b WHERE b.name LIKE '%Dante''s%';
yes
Here's the query and result with my test data. I'm using MariaDB version
11.8.2-MariaDB-ubu2404-log
, Node v22.16.0, and @prisma/client": "^6.10.1"