Dexie.js icon indicating copy to clipboard operation
Dexie.js copied to clipboard

Is it possible to do a Case Insensitve .between()?

Open Sjoerd82 opened this issue 2 years ago • 3 comments

Functionally, I'm trying to execute:

.where([id,lastName])
.startsWithIgnoreCase(value)

However, startsWithIgnoreCase works on strings, not on composite keys. I understood that .startsWith is syntactic suger for:

.where([id,lastName])
.between([5,'smith'],[5,'smith\uffff'])

Is it possible to do something similar, but while ignoring the case?

("id" is a kind of partitioning on the table)

Related to #544

Sjoerd82 avatar Aug 15 '23 13:08 Sjoerd82

Please explain... :)

dfahlander avatar Aug 15 '23 13:08 dfahlander

Please explain... :)

Sorry, hit some key by accident, and submitted before finishing the post... 2 minutes please ;-)

Sjoerd82 avatar Aug 15 '23 13:08 Sjoerd82

I still think it's a valid question, but as a solution I opted to simply convert my search attributes to lowercase, as this also improves read performance (reference: #1203). I'll leave this "issue" open, as this is not really an answer to the original question.

Sjoerd82 avatar Aug 17 '23 14:08 Sjoerd82