diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index ee7be6def0..2eaaed9e5c 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -699,6 +699,15 @@ Zotero.DBConnection.prototype.queryAsync = function (sql, params, options) { }; +Zotero.DBConnection.prototype.queryTx = function (sql, params, options) { + return this.executeTransaction(function* () { + options = options || {}; + delete options.tx; + return this.queryAsync(sql, params, options); + }.bind(this)); +}; + + /** * @param {String} sql SQL statement to run * @param {Array|String|Integer} [params] SQL parameters to bind