length() of column
Hello and good morning. Is there a way to in a query ask for the length of a column to be returned? e.g. in SQL:
SELECT length(message) as lng from TABLE;
Can this be done except by raw query?
2 Replies
Hello 👋
You would need to use Raw Query for this operation for now. There isn't any other way yet.
https://www.prisma.io/docs/orm/prisma-client/queries/raw-database-access/raw-queries#queryraw
Raw queries | Prisma Documentation
Learn how you can send raw SQL and MongoDB queries to your database using the raw() methods from the Prisma Client API.
ok thought so. thank you!