2014-09-01 17:18:45 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-04-19 16:31:52 -04:00
|
|
|
var Promise = require('bluebird/js/main/promise')();
|
|
|
|
var deprecate = require('./helpers').deprecate
|
2013-10-27 22:34:58 -04:00
|
|
|
|
2014-04-16 04:29:20 -04:00
|
|
|
Promise.prototype.yield = Promise.prototype.thenReturn;
|
|
|
|
Promise.prototype.ensure = Promise.prototype.lastly;
|
2013-11-27 16:51:01 -05:00
|
|
|
Promise.prototype.otherwise = Promise.prototype.caught;
|
2015-04-19 16:31:52 -04:00
|
|
|
Promise.prototype.exec = function() {
|
|
|
|
deprecate('knex.exec', 'knex.asCallback')
|
|
|
|
return Promise.prototype.nodeify()
|
|
|
|
};
|
2013-10-27 22:34:58 -04:00
|
|
|
|
2014-04-16 04:29:20 -04:00
|
|
|
module.exports = Promise;
|