The SQL connector a Prisma client is bound to.
Only contains is connector-sensitive in the Prisma adapter, and only
because the escaping it applies is correct solely on connectors whose LIKE
defaults the escape character to backslash. The three groups are:
- Escaped (
postgresql/postgres,mysql,sqlserver,cockroachdb) —LIKE-based with a backslash default escape, so the value is escaped. - Passed through (
mongodb) —containscompiles to a$regexmatch in which%and_are already literal, so escaping them would be wrong. This arm is unreachable on Prisma v7: a Prisma client for MongoDB cannot be constructed (generation succeeds, construction fails — MongoDB did not make the Prisma 7 release and returns in Prisma 8). It is retained because it is a published export (AI_GUIDELINES §9.2), and the reasoning stays correct for any future Prisma-Mongo client. The supported MongoDB route is the'mongodb'adapter arm (MongoDatabaseOptions). - Refused (
sqlite) —LIKE-based with no default escape character and noESCAPEclause from Prisma, so a literalcontainsis inexpressible.
'postgres' is accepted alongside 'postgresql' because the schema spells
it the long way while the driver adapter reports the short one. An
application whose connector cannot be detected passes provider explicitly
rather than have the adapter guess.