5 Replies
Hi @bockster6669 👋
Prisma Client does not have a substring method. However, you can achieve similar functionality using the
contains
, startsWith
, and endsWith
filters for string fields. These filters allow you to search for substrings within a string.
https://www.prisma.io/docs/orm/prisma-client/queries/filtering-and-sorting#filter-conditions-and-operatorsFiltering and Sorting (Concepts) | Prisma Documentation
Use Prisma Client API to filter records by any combination of fields or related record fields, and/or sort query results.
I just want to take the first 50 characters of a sentance
Prisma does not have a method to directly take the first 50 characters of a string field. However, you can achieve this by fetching the data and then manipulating the string in your application code.
yea I know, this doens't fix the bigger network traffic
You can do a raw SQL query, if it's a SQL db. I think the typed SQL stuff might make that easier