Closed iphonic closed 2 years ago
The mistake was we were creating a loop of transactions. Whereas the whole insertion should be in a single
db.transaction((tx) => {
//Put everything inside and use
tx.executeSql(....)
tx.executeSql(....)
tx.executeSql(....)
},
(error)=>{
},
()=>{
})
Hope it helps someone.
Hi, Thanks for the library. We have been looking for a solution for nested insertion in multiple tables. We are looking for the correct way of doing it. However, we are able to insert the data but it is insanely slow, though the data is not so big. We are assuming the problem lies in our approach.
This is sample data how it looks
Similarly, we have 13 categories and more or less the same data. Now what we are doing to insert this is as follows
So basically it's a loop in the completion of each execution, we are facing two major issues with this approach.
The above code uses 3 tables (categories, question1, question2)
Please SUGGEST the best way to tackle this.
Thanks.