TypedSQL - Boolean Argument Documentation

According to the docs, boolean values are converted to TINYINT(1) in MySQL, https://www.prisma.io/docs/orm/overview/databases/mysql#native-type-mapping-from-prisma-orm-to-mysql. However, TypedSQL converts boolean js values to strings, like 'true' and 'false'. This leads to consternation when trying to craft where clauses.
MySQL database connector | Prisma Documentation
This page explains how Prisma can connect to a MySQL or MariaDB database using the MySQL database connector.
2 Replies
Prisma AI Help
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.
Nurul
Nurul6d ago
Hey! Would you be able to provide a minimal reproduction for this behaviour so that our ORM team can have a look? Also, is it happening in version 6.14.0? You can create a GitHub Issue as well: https://github.com/prisma/prisma/issues
GitHub
prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - prisma/prisma

Did you find this page helpful?