cube-js/cube

Case sensitive "contains" filter operator

Open

#4.449 geöffnet am 27. Apr. 2022

Auf GitHub ansehen
 (3 Kommentare) (7 Reaktionen) (0 zugewiesene Personen)Rust (1.965 Forks)batch import
help wanted

Repository-Metriken

Stars
 (19.563 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 16h) (138 gemergte PRs in 30 T)

Beschreibung

Is your feature request related to a problem? Please describe. I let user search for words in his records and preview what has matched. So for example if he has a record with title of "Hello World" and he writes "world", Cubejs will return the record as it's case insensitive. However, after the user reviews returned records he can confirm selecting them, and this happens on my backend. By definition, my backend has to treat user search with respecting the case. So after user confirm his query, he's surprised that saved records are empty cause "world" does not match "Hello World".

Describe the solution you'd like I would like to pass an option to contains and notContains filter to force LIKE or ILIKE.

{
  member: "Book.title",
  operator: "contains",
  values: ["world"],
  caseSensetive: true
}

Describe alternatives you've considered N/A Additional context N/A

Contributor Guide