Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Combine query mode with operators #175

Closed
@affanshahid

Description

@affanshahid

I am trying to do a case insensitive search based on two different fields, however it doesn't seem to be working also can't find any docs on this. I tried the following but the search is still case sensitive:

db
    .candidate()
    .find_many(vec![or!(
            and!(
                candidate::name::mode(crate::prisma::_prisma::QueryMode::Insensitive),
                candidate::name::contains(search.clone()),
            ),
            and!(
                candidate::email::mode(crate::prisma::_prisma::QueryMode::Insensitive),
                candidate::email::contains(search.clone()),
            )
    )])
    .take(query.limit)
    .skip(query.offset)
    .exec();

It works fine if I just do it against one field with out the ors and ands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions