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

106
Views
Alcance de la variable en WebSQL

tengo esta funcion

 const _getCountriesByContinentCode = continent_code => { const someDb = SQLite.openDatabase(db); let foo = []; someDb.transaction(tx => { tx.executeSql("SOME SQL", [], (tx, results) => { for (let i = 0; i < results.rows.length; i++) { foo.push((results.rows.item(i))); } console.log('####', foo) // this logs the result as expected }); }); console.log('****', foo) // this does not log the pushed result, but an empty array }

El console.log('####', foo) registra como se esperaba los resultados de foo.push(...) . Sin embargo, console.log('****', foo) registra una matriz vacía.

¿Porqué es eso? ¿Es someDb.transaction(... asynchronus?

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

0

De hecho, como sugiere @Bergi en el comentario a continuación, Q: SQL.transaction y SQL.executeSql son asincrónicos.

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!