P
Prisma•6mo ago
bazyar

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
Nurul
Nurul•6mo ago
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.
bazyar
bazyarOP•6mo ago
ok thought so. thank you!
Want results from more Discord servers?
Add your server