Comparing version 0.4.3 to 0.4.4
@@ -47,3 +47,5 @@ 'use strict'; | ||
if (err) { | ||
if (self._currentTask.readOnly) { | ||
done(); // read-only doesn't require a transaction | ||
} else if (err) { | ||
self._db.exec(ROLLBACK, false, done); | ||
@@ -50,0 +52,0 @@ } else { |
@@ -117,3 +117,7 @@ 'use strict'; | ||
this._sqlQueue = new Queue(); | ||
this._sqlQueue.push(new SQLTask('BEGIN;', [], noop, noop)); | ||
if (!websqlDatabase._currentTask.readOnly) { | ||
// Since we serialize all access to the database, there is no need to | ||
// run read-only tasks in a transaction. This is a perf boost. | ||
this._sqlQueue.push(new SQLTask('BEGIN;', [], noop, noop)); | ||
} | ||
} | ||
@@ -120,0 +124,0 @@ |
{ | ||
"name": "websql", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "WebSQL Database API, implemented for Node using sqlite3", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29571
325