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

sql operations hangs on Android #763

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/android/io/sqlc/SQLitePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SQLitePlugin extends CordovaPlugin {
* THANKS to @NeoLSN (Jason Yang/楊朝傑) for giving the pointer in:
* https://github.com/litehelpers/Cordova-sqlite-storage/issues/727
*/
static Map<String, DBRunner> dbrmap = new ConcurrentHashMap<String, DBRunner>();
Map<String, DBRunner> dbrmap = new ConcurrentHashMap<String, DBRunner>();

/**
* NOTE: Using default constructor, no explicit constructor.
Expand Down
11 changes: 10 additions & 1 deletion www/SQLitePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,16 @@
}
}
};
cordova.exec(mycb, null, "SQLitePlugin", "backgroundExecuteSqlBatch", [
cordova.exec(mycb, function(message){
if(typeof result === "string"){
console.log(result);
if (tx.error && typeof tx.error === 'function') {
tx.error(newSQLError(result, 0));
}

}
console.log('error in running backgroundExecuteSqlBatch');
}, "SQLitePlugin", "backgroundExecuteSqlBatch", [
{
dbargs: {
dbname: this.db.dbname
Expand Down