Giter Club home page Giter Club logo

Comments (3)

brodybits avatar brodybits commented on August 10, 2024

I am running in to a problem where I get this ERROR:

Unable to begin transaction: cannot start a transaction within a transaction.

It's really a bummer. 😞

From the past 4-5 years of supporting this plugin I have never seen such an error before. Given the level of testing we have done in the test suite, others (such as Nolan Lawson) have done with the PouchDB adapter, and number of users in the field I would be extremely surprised to see this as a bug in the CoffeeScript/JavaScript part.

Considering that this is a multi-page app, my theory is that this happens if the JavaScript part starts a transaction and then the app goes to another page before the transaction finishes.

In case of a multi-page app I think the safest workaround is to execute all SELECTs and changes using db.executeSql instead of using the standard transaction mechanism.

from cordova-sqlite-ext.

svranch avatar svranch commented on August 10, 2024

Dude. this is too wierd. I thought the answer was to use JS Promises - so I re-worked the code and the thing still happened (!?!)

frustrating.

So I ended up back here and tried the last paragraph in your response above - and I think that is the answer - so far it is working.

But why do I seem to think you have to use the standard transaction mechanism? Do you know? Is it a rule or standard for sqlite? Or what?

thanks

  • Sandi

from cordova-sqlite-ext.

brodybits avatar brodybits commented on August 10, 2024

I would like to continue the discussion in storesafe/cordova-sqlite-storage#666 which I just opened on the main cordova-sqlite-storage version (sorry for the symbolism here).

from cordova-sqlite-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.