question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support case insensitive advanced JSON filtering

See original GitHub issue

Bug description

There is no support for case insensitive advanced JSON filtering on Prisma v2.23.0.

How to reproduce

Run any query filtering JSON fields and see that “string_contains” is case sensitive.

{
  applicantData :{
    path: ["details", "lastName"],
    string_contains: searchString,
  }
}

Expected behavior

There should be a field mode for this field type too (currently it’s possible to filter other field types with case insensitivity)

Prisma information

It shouldn’t be necessary to share Prisma information for this case.

Environment & setup

  • OS: Mac OSX, Apple Silicon
  • Database: PostgreSQL
  • Node.js version: Node v15.14.0

Prisma Version

prisma               : 2.23.0
@prisma/client       : 2.23.0
Current platform     : darwin
Query Engine         : query-engine adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : adf5e8cba3daf12d456d911d72b6e9418681b28b
Studio               : 0.393.0
Preview Features     : filterJson

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:30
  • Comments:8

github_iconTop GitHub Comments

9reactions
turakvladcommented, Mar 30, 2022

We need this feature as well. Is there any workaround for now?

8reactions
palashCItobuzcommented, Nov 24, 2021

Is there a way to do this yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Case insensitive filtering in JSON:API - Stack Overflow
JSON :API is agnostic about the strategies supported by a server. The filter query parameter can be used as the basis for any...
Read more >
Case sensitivity (Reference) - Prisma
Options for case-insensitive filtering. The recommended way to support case-insensitive filtering with Prisma Client depends on your underlying provider.
Read more >
Advanced hunting query best practices - Microsoft Learn
Apply filters early—Apply time filters and other filters to ... You can also use the case-sensitive equals operator == instead of =~ ....
Read more >
4. Filter field definition - Sonata Project
force_case_insensitivity - set to true to make the search case insensitive. By default false is used, letting the database to apply its default...
Read more >
SQL/JSON Path Expressions - Oracle Help Center
Matching of data against SQL/JSON path expressions is case-sensitive. ... A relative path expression is used inside a filter expression (filter, for short)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found