Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about new recommended calls #722

Closed
jondediego opened this issue Oct 29, 2017 · 1 comment
Closed

Question about new recommended calls #722

jondediego opened this issue Oct 29, 2017 · 1 comment

Comments

@jondediego
Copy link

I am working in a project were performance is important. So we try to insert a lot of records. Also, when some insertion fails we don't need to rollback, but we need to do detect which element produced the error, don't execute next inserts, but allow the previous inserts to persist.
So in order to achieve good performance we want to use db.sqlBatch method instead of db.executeSql. Is there a way we can achieve this behaviour using db.sqlBatch? I know how to achieve it using deprecated db.transaction, but I wanted to know if this also could be achieved using new calls.

@brodycj
Copy link
Contributor

brodycj commented Oct 30, 2017

Adding a cross-reference to #720.

You seem to have an almost perfect case for the deprecated Web SQL API, which I have not seen so often. It would be possible to add an option to the sqlBatch call to support your use case but then we would start another road to the kind of complexity I was hoping to get rid of.

For your case I would recommend using the cordova-sqlite-ext version which will continue to support the Web SQL API for the foreseeable future.

I would like to continue the discussion in #720, closing this one.

@brodycj brodycj closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants