Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7636485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:41:35+00:00 2026-05-31T07:41:35+00:00

Can someone please tell me if it is possible to execute case-insensitive search on

  • 0

Can someone please tell me if it is possible to execute case-insensitive search on indexeddb object store using index, openCursor and keyRange….
I can do case sensitive and managed to implement something using toUpperCase function but there are so many different varaitions that it is not feasible relly…
Any help welcomed… Thanx…
Example of an attempt:

var transaction = db.transaction("products", IDBTransaction.READ_ONLY);
var store = transaction.objectStore("products");
var descIndex = store.index('Index1');
var boundKeyRangeUpper = IDBKeyRange.bound(request.term.toUpperCase(), (request.term.toUpperCase()+'Z'));
descIndex.openCursor(boundKeyRangeUpper).onsuccess = function (e) 

UPDATE
This is what I ended up implementing:
Four ranges that cover and possibility i.e. FA,fA,Fa,fa… This is done on the first letter only i.e. ‘F’

var boundKeyRangeUpper = IDBKeyRange.bound(term.toUpperCase(), term.toUpperCase()+'Z');
var boundKeyRangeUpper2 = IDBKeyRange.bound(term.toUpperCase(), term.toUpperCase()+'z');
var boundKeyRangeLower = IDBKeyRange.bound(term.toLowerCase(), term.toLowerCase()+'z');
var boundKeyRangeLower2 = IDBKeyRange.bound(term.toLowerCase(), term.toLowerCase()+'Z');

The results of the searches above is stored in another objectStore but with their description as uppercase hence FISH, FRUIT, FRESH SALAD… Now if a letter is pressed after F e.g. ‘r’ the search will look into this new object store where everything is uppercase… This is not an ideal solution by far but it works and it is quick for my needs… Perhaps we will get case insensative search eventually, perhaps not…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:41:36+00:00Added an answer on May 31, 2026 at 7:41 am

    I recommend modifying the structure of the object store, this is by adding a column (i.e. a property to each object in the store) with the same value of the key BUT to upper case, then make this new property the key instead.

    //object
    var lang = {
        name: 'Javascript',
        keyName: '', //THE NEW PROPERTY - KEY OF THE OBJECTSTORE
        interest: 100
    };
    

    when you add an object to the store modify the new property with the uppercase of the name (or term or whatever) so the object will be:

    //object
    var lang = {
        name: 'Javascript',
        keyName: 'JAVASCRIPT', // NEW PROPERTY MODIFIED TO UPPERCASE OF OLD KEY
        interest: 100
    };
    

    then proceed with your code as it.

    javascript indexeddb html5

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please tell me which objects types can be tested using Regular Expressions
Possible Duplicate: Show line number in exception handling Can someone please tell me how
Possible Duplicate: Integer with leading zeroes Can someone please tell me what is going
the question says it all. Can someone please tell me if that is possible
Can someone please tell me why this doesn't work? I'm trying to show and
Can someone please tell me how I can implement the following line of pseudo-code.
Can someone please tell me ehy in IE 6 div is not in center.
can someone please tell why , Great Microsoft that created C# language and now
Can someone please tell me how to show all privileges/rules from a specific user
Can someone please tell me whats wrong with this code. I'm not getting complete

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.