Here's a straightforward question I have: I need to search for a specific string match in a query. The code snippet is shown below:
const test_name = 'ExAmPlE'
const database_resources = await prisma.market.findMany({
where: {
name: test_name
}
})
I am aware that I can use string.toLowerCase()
in certain cases, but how can I retrieve all rows where the "name" field matches regardless of case, such as Example
, ExAMple
, or example
, but not including outliers like Exàmplé
?