mirror of
https://github.com/knex/knex.git
synced 2025-10-10 23:48:27 +00:00

Beefed up transaction implementation, still needs tests and cleanup of nested transaction queues. Left todo: - Fix commented out tests - Fix oracle driver's transactions
15 lines
367 B
JavaScript
15 lines
367 B
JavaScript
'use strict';
|
|
|
|
var Promise = require('bluebird/js/main/promise')();
|
|
var deprecate = require('./helpers').deprecate
|
|
|
|
// Incase we're using an older version of bluebird
|
|
Promise.prototype.asCallback = Promise.prototype.nodeify
|
|
|
|
Promise.prototype.exec = function(cb) {
|
|
deprecate('knex.exec', 'knex.asCallback')
|
|
return this.nodeify(cb)
|
|
};
|
|
|
|
module.exports = Promise;
|