Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

94
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda