Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
Javascript indexed database how to do a more specific search

I have a javascript indexeddb, each primary index is an two-long incrementing array, from [0,0] to [x,y]:

[0,0]
[0,1]
[0,2]
...
[1,0]
[1,1]
...
[x,y]

My current get request involves the following statement:

var transaction = db.transaction("myData", "readonly");
var c = transaction.objectStore("myData");
var a = c.getAll(IDBKeyRange.bound([0,0],[5,5]));

However, this gets all data where the first value is between 0 and 5, and does not take into account the second value, sending a return like the following:

[0,0]
[0,1]
[0,2]
...
[0,y]
[1,0]
...
[5,y]

Is there any way to get it to become more precise and take into account the y range? Using a cursor on all of the values is not acceptable.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A key-value store is less (much less?) efficient than a simply array for your data.

If you need to "save" the data between invocations of the web page, then perhaps toss that array into a JSON structure. That could be a single item in "indexeddb".

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!