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

270
Views
Sqlite executeSql is not returning ResultSet

I am attempting to perform a simple query with Sqlite in React-Native using the react-native-sqlite-storage plugin. Based on the documentation I should get two paramters into the success callback 1) the SQLite.Transaction and 2) SQLlite.ResultSet but I am only getting the SQLite.Transaction in my example.

let sql = "SELECT * FROM table_a;"
let params = [];

db.executeSql(sql, params,
  (trans, results) => {
    console.log("execute success results: " + JSON.stringify(results))
    console.log("execute success transaction: " + JSON.stringify(trans))
    //resolve(results);
    resolve(trans);
  },
  (error) => {
    console.log("execute error: " + error);
    reject(error);
});  

Console output

execute success results: undefined
execute success transaction: {"rows":{"length":1},"rowsAffected":0}  
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I forgot to wrap my executeSql in a transaction. This works as expected:

db.transaction((txn) => {
    txn.executeSql(sql, params, (trans, results) => {
        console.log("execute success results: " + JSON.stringify(results))
        console.log("execute success transaction: " + JSON.stringify(trans))
        //resolve(results);
        resolve(trans);
    },
        (error) => {
        console.log("execute error: " + JSON.stringify(error))
        reject(error);
    });
});
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!