Skip to content

Instantly share code, notes, and snippets.

@devinus
Created March 1, 2010 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save devinus/318882 to your computer and use it in GitHub Desktop.
Save devinus/318882 to your computer and use it in GitHub Desktop.
Connection.prototype.query = function (sql) {
if (!this._queries) this._queries = [];
var promise = new process.Promise;
promise.sql = sql;
this._queries.push(promise);
this.maybeDispatchQuery();
return promise;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment