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.

Cannot filter using accent Insensitive

See original GitHub issue

Bug description

I’ve looked in all the places trying to find a way to use {where: {field: {contains: 'João' } } and retrieve all the results without matching of accents,

The result I expect: i.e : João = Joao

I’ve tried to add a collation that ignore accents manually in the field that I’m searching, like this:

// Creating the collation
CREATE COLLATION ignore_accent (provider = icu, locale = 'und-u-ks-level1-kc-true', deterministic = false);

// Creating the table with the collation already applied in the field
CREATE TABLE "protocols" (
    "id" SERIAL NOT NULL,
    "title" TEXT NOT NULL COLLATE ignore_accent,

    CONSTRAINT "protocols_pkey" PRIMARY KEY ("id")
);

But It is showing me this error

ConnectorError(ConnectorError {
 user_facing_error: None, kind: QueryError(Error {
 kind: Db, cause: Some(DbError { severity: "ERROR", 
parsed_severity: Some(Error), code: SqlState(E0A000), 
message: "nondeterministic collations are not supported for ILIKE", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("like.c"), line: Some(199), routine: Some("Generic_Text_IC_like") 
}) }) })

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sostenesapollocommented, Dec 16, 2022

I think if you switch to mysql you’ll be able to run with your custom collation or something like this

1reaction
sostenesapollocommented, Dec 16, 2022

@NikitaMasl yeah, I’ve tried everything you can imagine, and it seems to be a prisma limitation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accent insensitive in filter backend to datatable in ASP.NET ...
This is the error: LINQ to Entities does not recognize the method 'System.String RemoveDiacritics(System.String)' method, and this method cannot ...
Read more >
ACCENT INSENSITIVE FILTERING - Telerik Forums
Hello, I have a radgrid with filters and I want my futur users to be able to perform ACCENT INSENSITIVE filtering.
Read more >
Accent insensitive RowFilter on DataView - MSDN - Microsoft
Hello! I would like this code to return all results in the dataview: Jose, José, Joseana. However, due to the accentuation, it is...
Read more >
Set AutoRow filter accent insensitive - DevExpress Support
Hello, we would like to enable to user set autofilter search accent insensitive/sensitive on grid level. Data should not be filtered on ...
Read more >
Case sensitivity (Reference) - Prisma
How Prisma Client handles case sensitivity when filtering and sorting. ... You cannot use case-insensitive filtering with C collation; citext columns are ...
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