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

90
Views
Cómo usar una parte del campo de ruta clave para obtener el resultado de la consulta en indexedDB cuando la ruta clave es una matriz

tengo unos datos asi

 [ { code: 'string1', id: 1, body: {\*some data*\} }, { code: 'string2', id: 2, body: {\*some data*\} }, ....... ]

Ahora, uso esto para obtener resultados.

 const compStore = db.createObjectStore(COMP_STORE, { keyPath: ['id', 'code'], autoIncrement: false, }); const getConfigByAPPID = async (appId: number) => { try { const db = await this.dbIns; const keyrange = IDBKeyRange.only([1, 'string1']); const components = await db.getAll(COMP_STORE, keyrange); console.log(components); } catch (error) { console.log(error); } };

Solo devuelve un dato. ¿Tiene alguna forma de obtener datos múltiples? como esto

 IDBKeyRange.only([1, '*'])

También traté de usar el índice para buscar en la tabla, pero index.iterate no está definido.

about 4 years ago · Juan Pablo Isaza
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!